-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93da091
commit c85cf35
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import pytest | ||
import urllib3 | ||
|
||
from bedrock.versions import Version, Versions | ||
|
||
|
||
def setup(): | ||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | ||
|
||
|
||
def test_invalid_version_is_none(): | ||
assert(Versions.get_by_version("Invalid") is None) | ||
|
||
|
||
def test_deprectated_version(): | ||
version = Versions.get_by_version("0.13.0.0") | ||
assert(version.version == "0.13.0.0") | ||
assert(version.is_deprecated is True) | ||
assert(version.uri is None) | ||
|
||
|
||
def test_valid_version(): | ||
version = Versions.get_by_version("1.8.0.24") | ||
assert(version.version == "1.8.0.24") | ||
assert(version.update_id is not None) | ||
assert(version.is_beta is False) | ||
assert(version.is_deprecated is False) | ||
assert(version.uri is not None) | ||
|
||
|
||
def test_valid_version_beta(): | ||
version = Versions.get_by_version("1.11.0.3") | ||
assert(version.version == "1.11.0.3") | ||
assert(version.update_id is not None) | ||
assert(version.is_beta is True) | ||
assert(version.is_deprecated is False) | ||
assert(version.uri is None) |