Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Byers committed Sep 14, 2017
1 parent 1b742e6 commit 7257704
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def configure(self) -> None:
# API token already exists - ask if they want to update it.
while True:
update_api_token = self._get_input(
'Change the CarbonBlack API token [yes/no]?', 'no'
'Change the CarbonBlack API token?', 'no'
)
if update_api_token in {'yes', 'no'}:
break
Expand Down
6 changes: 3 additions & 3 deletions tests/manage_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ def test_configure_with_defaults(
mock_input.assert_has_calls([
mock.call('AWS Region (us-test-1): '),
mock.call('Unique name prefix, e.g. "company_team" (test_prefix): '),
mock.call('Enable the CarbonBlack downloader [yes/no]? (yes): '),
mock.call('Enable the CarbonBlack downloader? (yes): '),
mock.call('CarbonBlack URL (https://cb-example.com): '),
mock.call('Change the CarbonBlack API token [yes/no]? (no): ')
mock.call('Change the CarbonBlack API token? (no): ')
])

# Verify that the configuration has changed.
Expand All @@ -171,7 +171,7 @@ def test_configure_with_no_defaults(
mock_input.assert_has_calls([
mock.call('AWS Region: '),
mock.call('Unique name prefix, e.g. "company_team": '),
mock.call('Enable the CarbonBlack downloader [yes/no]? (no): '),
mock.call('Enable the CarbonBlack downloader? (no): '),
mock.call('CarbonBlack URL: '),
])

Expand Down
2 changes: 1 addition & 1 deletion tests/rules/compile_rules_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ def test_find_yara_rules_mixed_case(self):

def test_find_yara_rules_skip_other_files(self):
"""Non-YARA files are skipped during the traversal."""
self.fs.CreateFile('/rules/clone_rules.py')
self.fs.CreateFile('/rules/compile_rules.py')
self.fs.CreateFile('/rules/eicar.yar')
self.fs.CreateFile('/rules/README.md')
self.fs.CreateFile('/rules/clone_rules.py')
self.assertEqual(['eicar.yar'], self._sorted_find())


Expand Down

0 comments on commit 7257704

Please sign in to comment.