Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions rosette/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,10 @@ def __del__(self):
except ReferenceError:
pass

def get_binding_version(self):
""" Return the current binding version """
return _BINDING_VERSION

def get_user_agent_string(self):
""" Return the User-Agent string """
return self.user_agent_string
Expand Down
3 changes: 1 addition & 2 deletions tests/test_rosette_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
RosetteException)

_ISPY3 = sys.version_info[0] == 3
_BINDING_VERSION = '1.8.2'


@pytest.fixture
Expand Down Expand Up @@ -138,7 +137,7 @@ def test_invalid_header(api):

def test_user_agent(api):
""" Test user agent """
value = "RosetteAPIPython/" + _BINDING_VERSION + "/" + platform.python_version()
value = "RosetteAPIPython/" + api.get_binding_version() + "/" + platform.python_version()
assert value == api.get_user_agent_string()

# Test that pinging the API is working properly
Expand Down