diff --git a/tests/unit/browser/test_adblock.py b/tests/unit/browser/test_adblock.py index e4e7a0eda..ec43aa772 100644 --- a/tests/unit/browser/test_adblock.py +++ b/tests/unit/browser/test_adblock.py @@ -429,7 +429,7 @@ def test_config_change(config_stub, basedir, download_stub, host_blocker = adblock.HostBlocker() host_blocker.read_hosts() - config_stub.set_obj('content.host_blocking.lists', None) + config_stub.val.content.host_blocking.lists = None host_blocker.read_hosts() for str_url in URLS_TO_CHECK: assert not host_blocker.is_blocked(QUrl(str_url)) diff --git a/tests/unit/browser/test_history.py b/tests/unit/browser/test_history.py index 7c6d4af45..2f4827b0a 100644 --- a/tests/unit/browser/test_history.py +++ b/tests/unit/browser/test_history.py @@ -226,8 +226,7 @@ class TestAdd: def test_exclude(self, hist, config_stub): """Excluded URLs should be in the history but not completion.""" - config_stub.set_obj('completion.web_history.exclude', - ['*.example.org']) + config_stub.val.completion.web_history.exclude = ['*.example.org'] url = QUrl('http://www.example.org/') hist.add_from_tab(url, url, 'title') assert list(hist) @@ -489,8 +488,7 @@ class TestRebuild: This setting should only be used for the completion. """ - config_stub.set_obj('completion.web_history.exclude', - ['*.example.org']) + config_stub.val.completion.web_history.exclude = ['*.example.org'] assert hist.metainfo['force_rebuild'] hist.add_url(QUrl('http://example.com'), redirect=False, atime=1) @@ -500,7 +498,7 @@ class TestRebuild: assert list(hist2.completion) == [('http://example.com', '', 1)] def test_unrelated_config_change(self, config_stub, hist): - config_stub.set_obj('history_gap_interval', 1234) + config_stub.val.history_gap_interval = 1234 assert not hist.metainfo['force_rebuild'] diff --git a/tests/unit/browser/test_qutescheme.py b/tests/unit/browser/test_qutescheme.py index 9cc8ad31d..27caaeb6f 100644 --- a/tests/unit/browser/test_qutescheme.py +++ b/tests/unit/browser/test_qutescheme.py @@ -136,7 +136,7 @@ class TestHistoryHandler: def test_exclude(self, fake_web_history, now, config_stub): """Make sure the completion.web_history.exclude setting is not used.""" - config_stub.set_obj('completion.web_history.exclude', ['www.x.com']) + config_stub.val.completion.web_history.exclude = ['www.x.com'] url = QUrl("qute://history/data?start_time={}".format(now)) _mimetype, data = qutescheme.qute_history(url) diff --git a/tests/unit/mainwindow/test_messageview.py b/tests/unit/mainwindow/test_messageview.py index 64468bcfb..cd7c40bc3 100644 --- a/tests/unit/mainwindow/test_messageview.py +++ b/tests/unit/mainwindow/test_messageview.py @@ -81,7 +81,7 @@ def test_changing_timer_with_messages_shown(qtbot, view, config_stub): config_stub.val.messages.timeout = 900000 # 15s view.show_message(usertypes.MessageLevel.info, 'test') with qtbot.waitSignal(view._clear_timer.timeout): - config_stub.set_obj('messages.timeout', 100) + config_stub.val.messages.timeout = 100 @pytest.mark.parametrize('count, expected', [(1, 100), (3, 300),