UT: Remove unnecessary wait() from test_version

Unit tests should not be exposed to the internals of what they are
testing. Furthermore, the `latest_version` and `download` properties
wait for the event to be set, making the extra `wait()` redundant.
This commit is contained in:
Mike Salvatore 2022-08-12 10:26:11 -04:00
parent 94a25b07b2
commit 658607de25
1 changed files with 4 additions and 2 deletions

View File

@ -27,15 +27,17 @@ successful_response.return_value.json.return_value = {
)
def test_version__request_failed(monkeypatch, request_mock):
monkeypatch.setattr("requests.get", request_mock)
version = Version(version_number="1.0.0", deployment=Deployment.DEVELOP)
version._initialization_complete.wait()
assert version.latest_version == "1.0.0"
assert version.download_url is None
def test_version__request_successful(monkeypatch):
monkeypatch.setattr("requests.get", successful_response)
version = Version(version_number="1.0.0", deployment=Deployment.DEVELOP)
version._initialization_complete.wait()
assert version.latest_version == SUCCESS_VERSION
assert version.download_url == SUCCESS_URL