Skip to content

Commit c4dfa71

Browse files
committed
test platform_version
1 parent 05b8ed8 commit c4dfa71

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/unit/test_core.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,16 @@ def test_request_formats():
199199
assert isinstance(resp, RestObj)
200200
assert resp.name == 'test'
201201

202+
203+
def test_platform_version():
204+
from sasctl import platform_version
205+
206+
with mock.patch('sasctl.services.model_repository.info') as mock_info:
207+
mock_info.return_value = {'build': {'buildVersion': '3.7.231'}}
208+
version = platform_version()
209+
assert version == '3.5'
210+
211+
with mock.patch('sasctl.services.model_repository.info') as mock_info:
212+
mock_info.return_value = {'build': {'buildVersion': '3.12.77'}}
213+
version = platform_version()
214+
assert version == '4.0'

0 commit comments

Comments
 (0)