Skip to content

Commit

Permalink
Issue 157: No module named 'onelogin.api.client (#158)
Browse files Browse the repository at this point in the history
* Quick fix for issue 157: avoids breaking changes from onelogin python SDK version 3.0.0 by requiring version >= 2.0 but < 3.0

* Fix test assertions to compare integers instead of numeric strings
  • Loading branch information
markatgrindr committed Nov 3, 2022
1 parent 3abcd14 commit 34b3722
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions onelogin_aws_cli/tests/test_MFACredentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,21 @@ def test_select_device(self):
]

self.mfa.select_device(devices[:1])
self.assertEqual(self.mfa.device.id, '1')
self.assertEqual(self.mfa.device.id, 1)

with patch('builtins.input', side_effect=['3']):
self.mfa.select_device(devices)

self.assertEqual(self.mfa.device.id, '3')
self.assertEqual(self.mfa.device.id, 3)

self.mfa._config["otp_device"] = "DeviceType2"

# Ignores invalid selection
self.mfa.select_device(devices[:1])
self.assertEqual(self.mfa.device.id, '1')
self.assertEqual(self.mfa.device.id, 1)

self.mfa.select_device(devices)
self.assertEqual(self.mfa.device.id, '2')
self.assertEqual(self.mfa.device.id, 2)

del self.mfa._config["otp_device"]

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
boto3
onelogin
onelogin >= 2.0, < 3.0
keyring
requests

0 comments on commit 34b3722

Please sign in to comment.