diff --git a/tests/unit/utils/test_version.py b/tests/unit/utils/test_version.py index eff67dcd8..2f6aa648f 100644 --- a/tests/unit/utils/test_version.py +++ b/tests/unit/utils/test_version.py @@ -957,7 +957,8 @@ def test_opengl_vendor(): def pbclient(stubs): http_stub = stubs.HTTPPostStub() client = pastebin.PastebinClient(http_stub) - return client + yield client + version.pastebin_url = None def test_pastebin_version(pbclient, message_mock, monkeypatch, qtbot): @@ -973,8 +974,6 @@ def test_pastebin_version(pbclient, message_mock, monkeypatch, qtbot): assert msg.text == "Version url test yanked to clipboard." assert version.pastebin_url == "test" - version.pastebin_url = None - def test_pastebin_version_twice(pbclient, monkeypatch): """Test whether calling pastebin_version twice sends no data.""" @@ -993,8 +992,6 @@ def test_pastebin_version_twice(pbclient, monkeypatch): assert pbclient.data is None assert version.pastebin_url == "test2" - version.pastebin_url = None - def test_pastebin_version_error(pbclient, caplog, message_mock, monkeypatch): """Test version.pastebin_version() with errors."""