Skip to content

Commit

Permalink
An 5626 fix is available in sdk (#112)
Browse files Browse the repository at this point in the history
* Fix: is_available
  • Loading branch information
guysl10 authored Aug 13, 2023
1 parent ec9f0f8 commit ad7bee7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.18.8
------
- Fix is_available method.

1.18.7
______
- Support email file path for sending phishing email.
Expand Down
2 changes: 1 addition & 1 deletion intezer_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.18.7'
__version__ = '1.18.8'
3 changes: 1 addition & 2 deletions intezer_sdk/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 2 additions & 2 deletions tests/unit/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand All @@ -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())

Expand Down

0 comments on commit ad7bee7

Please sign in to comment.