Skip to content

Commit 854f237

Browse files
authored
Merge pull request #78 from rosette-api/RCB-547_remove-hardcoded-version-from-tests
RCB-547 Remove hardcoded version from test
2 parents 05c1f4a + 49da3d1 commit 854f237

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

rosette/api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,10 @@ def __del__(self):
575575
except ReferenceError:
576576
pass
577577

578+
def get_binding_version(self):
579+
""" Return the current binding version """
580+
return _BINDING_VERSION
581+
578582
def get_user_agent_string(self):
579583
""" Return the User-Agent string """
580584
return self.user_agent_string

tests/test_rosette_api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
RosetteException)
3232

3333
_ISPY3 = sys.version_info[0] == 3
34-
_BINDING_VERSION = '1.8.2'
3534

3635

3736
@pytest.fixture
@@ -138,7 +137,7 @@ def test_invalid_header(api):
138137

139138
def test_user_agent(api):
140139
""" Test user agent """
141-
value = "RosetteAPIPython/" + _BINDING_VERSION + "/" + platform.python_version()
140+
value = "RosetteAPIPython/" + api.get_binding_version() + "/" + platform.python_version()
142141
assert value == api.get_user_agent_string()
143142

144143
# Test that pinging the API is working properly

0 commit comments

Comments
 (0)