summaryrefslogtreecommitdiff
path: root/tests/helpers/fixtures.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-06-22 18:00:44 +0200
committerFlorian Bruhin <me@the-compiler.org>2020-06-22 20:08:56 +0200
commit06ae02511e3ff4b7151a884a01ca9d3373fabf54 (patch)
tree41f03eef664fd8509a64cb1046b50a4a1021d493 /tests/helpers/fixtures.py
parent3c4e9f163ed90972f7ee1fdfd29536cc8fa9f941 (diff)
downloadqutebrowser-06ae02511e3ff4b7151a884a01ca9d3373fabf54.tar.gz
qutebrowser-06ae02511e3ff4b7151a884a01ca9d3373fabf54.zip
tests: Move some fixtures to tests/helpers/fixtures.py
Diffstat (limited to 'tests/helpers/fixtures.py')
-rw-r--r--tests/helpers/fixtures.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/helpers/fixtures.py b/tests/helpers/fixtures.py
index 60a4f02ba..0b0347ca2 100644
--- a/tests/helpers/fixtures.py
+++ b/tests/helpers/fixtures.py
@@ -676,3 +676,26 @@ def web_history(fake_save_manager, tmpdir, init_sql, config_stub, stubs,
web_history = history.WebHistory(stubs.FakeHistoryProgress())
monkeypatch.setattr(history, 'web_history', web_history)
return web_history
+
+
+@pytest.fixture
+def blue_widget(qtbot):
+ widget = QWidget()
+ widget.setStyleSheet('background-color: blue;')
+ qtbot.add_widget(widget)
+ return widget
+
+
+@pytest.fixture
+def red_widget(qtbot):
+ widget = QWidget()
+ widget.setStyleSheet('background-color: red;')
+ qtbot.add_widget(widget)
+ return widget
+
+
+@pytest.fixture
+def state_config(data_tmpdir, monkeypatch):
+ state = configfiles.StateConfig()
+ monkeypatch.setattr(configfiles, 'state', state)
+ return state