diff --git a/tests/unit/completion/test_models.py b/tests/unit/completion/test_models.py index 1c39b6ea2..572291eb0 100644 --- a/tests/unit/completion/test_models.py +++ b/tests/unit/completion/test_models.py @@ -238,7 +238,7 @@ def test_tab_completion(stubs, qtbot, app_stub, win_registry, def test_tab_completion_delete(stubs, qtbot, app_stub, win_registry, - tabbed_browser_stubs): + tabbed_browser_stubs, qtbot): """Verify closing a tab by deleting it from the completion widget.""" tabbed_browser_stubs[0].tabs = [ stubs.FakeWebView(QUrl('https://github.com'), 'GitHub', 0), @@ -250,6 +250,7 @@ def test_tab_completion_delete(stubs, qtbot, app_stub, win_registry, ] model = miscmodels.TabCompletionModel() view = _mock_view_index(model, 0, 1) + qtbot.add_widget(view) model.delete_cur_item(view) actual = [tab.url() for tab in tabbed_browser_stubs[0].tabs] assert actual == [QUrl('https://github.com'),