diff --git a/CHANGES b/CHANGES index 19f70ba..cf5d265 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1.18.8 +------ +- Fix is_available method. + 1.18.7 ______ - Support email file path for sending phishing email. diff --git a/intezer_sdk/__init__.py b/intezer_sdk/__init__.py index 74de0ac..66d03e6 100644 --- a/intezer_sdk/__init__.py +++ b/intezer_sdk/__init__.py @@ -1 +1 @@ -__version__ = '1.18.7' +__version__ = '1.18.8' diff --git a/intezer_sdk/api.py b/intezer_sdk/api.py index 0213b50..b559924 100644 --- a/intezer_sdk/api.py +++ b/intezer_sdk/api.py @@ -222,8 +222,7 @@ def assert_any_on_premise(self): def is_available(self) -> bool: response = requests.get(f'{self.full_url}/is-available') if response.status_code == HTTPStatus.OK: - is_available = response.json().get('result', {}).get('is_available') - return is_available + return response.json().get('is_available') return False diff --git a/tests/unit/base_test.py b/tests/unit/base_test.py index aae6ef2..36cea7e 100644 --- a/tests/unit/base_test.py +++ b/tests/unit/base_test.py @@ -103,7 +103,7 @@ def test_is_intezer_site_available(self): mock.add('GET', url=f'{self.full_url}/is-available', status=HTTPStatus.OK, - json={'result': {'is_available': True}}) + json={'is_available': True}) # Act & Assert self.assertTrue(api.is_available()) @@ -115,7 +115,7 @@ def test_is_intezer_site_available_website_not_available(self): mock.add('GET', url=f'{self.full_url}/is-available', status=HTTPStatus.OK, - json={'result': {'is_available': False}}) + json={'is_available': False}) # Act & Assert self.assertFalse(api.is_available())