Skip to content

Commit

Permalink
Updated test cases to handle config precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
drewsonne committed Apr 21, 2018
1 parent e5c7b70 commit ba49e0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions onelogin_aws_cli/tests/test_configurationFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ def test_initialise(self):
str.seek(0)

self.assertEqual("""[defaults]
save_password = False
duration_seconds = 3600
base_uri = https://api.eu.onelogin.com/
client_id = mock_client_id
client_secret = mock_client_secret
Expand Down
5 changes: 3 additions & 2 deletions onelogin_aws_cli/tests/test_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ def test___contains__false(self):
self.assertFalse('mock' in sec)

def test_set_overrides(self):
sec = Section('mock-section', Namespace(
get=MagicMock(return_value='world')
sec = Section('mock-section', MagicMock(
get=MagicMock(return_value='world'),
has_option=MagicMock(return_value=True)
))

self.assertEqual(sec['foo'], 'world')
Expand Down

0 comments on commit ba49e0c

Please sign in to comment.