Fix unit tests for end2end SQL change

This commit is contained in:
Florian Bruhin 2017-09-17 11:49:42 +02:00
parent 36ca819cb3
commit 62b30af12a
3 changed files with 10 additions and 2 deletions

View File

@ -30,8 +30,9 @@ from qutebrowser.commands import cmdexc
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
def prerequisites(config_stub, fake_save_manager, init_sql): def prerequisites(config_stub, fake_save_manager, init_sql, fake_args):
"""Make sure everything is ready to initialize a WebHistory.""" """Make sure everything is ready to initialize a WebHistory."""
fake_args.debug_flags = []
config_stub.data = {'general': {'private-browsing': False}} config_stub.data = {'general': {'private-browsing': False}}

View File

@ -105,8 +105,9 @@ class TestHistoryHandler:
objreg.delete('web-history') objreg.delete('web-history')
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
def fake_history(self, fake_web_history, entries): def fake_history(self, fake_web_history, fake_args, entries):
"""Create fake history.""" """Create fake history."""
fake_args.debug_flags = []
for item in entries: for item in entries:
fake_web_history.add_url(**item) fake_web_history.add_url(**item)

View File

@ -314,6 +314,12 @@ def test_bookmark_completion_delete(qtmodeltester, bookmarks, row, removed):
assert before.difference(after) == {removed} assert before.difference(after) == {removed}
@pytest.fixture(autouse=True)
def url_args(fake_args):
"""Prepare arguments needed to test the URL completion."""
fake_args.debug_flags = []
def test_url_completion(qtmodeltester, web_history_populated, def test_url_completion(qtmodeltester, web_history_populated,
quickmarks, bookmarks, info): quickmarks, bookmarks, info):
"""Test the results of url completion. """Test the results of url completion.