Clean up version.pastebin_url in pbclient fixture
This commit is contained in:
parent
2fbc7b4e1d
commit
13bd4dd05d
@ -957,7 +957,8 @@ def test_opengl_vendor():
|
|||||||
def pbclient(stubs):
|
def pbclient(stubs):
|
||||||
http_stub = stubs.HTTPPostStub()
|
http_stub = stubs.HTTPPostStub()
|
||||||
client = pastebin.PastebinClient(http_stub)
|
client = pastebin.PastebinClient(http_stub)
|
||||||
return client
|
yield client
|
||||||
|
version.pastebin_url = None
|
||||||
|
|
||||||
|
|
||||||
def test_pastebin_version(pbclient, message_mock, monkeypatch, qtbot):
|
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 msg.text == "Version url test yanked to clipboard."
|
||||||
assert version.pastebin_url == "test"
|
assert version.pastebin_url == "test"
|
||||||
|
|
||||||
version.pastebin_url = None
|
|
||||||
|
|
||||||
|
|
||||||
def test_pastebin_version_twice(pbclient, monkeypatch):
|
def test_pastebin_version_twice(pbclient, monkeypatch):
|
||||||
"""Test whether calling pastebin_version twice sends no data."""
|
"""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 pbclient.data is None
|
||||||
assert version.pastebin_url == "test2"
|
assert version.pastebin_url == "test2"
|
||||||
|
|
||||||
version.pastebin_url = None
|
|
||||||
|
|
||||||
|
|
||||||
def test_pastebin_version_error(pbclient, caplog, message_mock, monkeypatch):
|
def test_pastebin_version_error(pbclient, caplog, message_mock, monkeypatch):
|
||||||
"""Test version.pastebin_version() with errors."""
|
"""Test version.pastebin_version() with errors."""
|
||||||
|
Loading…
Reference in New Issue
Block a user