From 13bd4dd05dde3c11332f51db912ca73340e4f28d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 21 Feb 2018 10:49:42 +0100 Subject: [PATCH] Clean up version.pastebin_url in pbclient fixture --- tests/unit/utils/test_version.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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."""