diff --git a/rosette/api.py b/rosette/api.py index 77e9377..244dacb 100644 --- a/rosette/api.py +++ b/rosette/api.py @@ -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 diff --git a/tests/test_rosette_api.py b/tests/test_rosette_api.py index 365193d..0c3cfbb 100644 --- a/tests/test_rosette_api.py +++ b/tests/test_rosette_api.py @@ -31,7 +31,6 @@ RosetteException) _ISPY3 = sys.version_info[0] == 3 -_BINDING_VERSION = '1.8.2' @pytest.fixture @@ -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