Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
psemenyukpaloaltonetworks committed Apr 17, 2024
1 parent 019599d commit be29f58
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions tests/core/secrets_collection_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@ def test_file_based_success_config():
assert [str(secret).splitlines()[1] for _, secret in secrets] == [
'Location: test_data/config.ini:2',
'Location: test_data/config.ini:10',
'Location: test_data/config.ini:10',
'Location: test_data/config.ini:21',
'Location: test_data/config.ini:22',
'Location: test_data/config.ini:32',
'Location: test_data/config.ini:32',
'Location: test_data/config.ini:33',
]

@staticmethod
Expand All @@ -102,6 +105,7 @@ def test_file_based_success_yaml():
'Location: test_data/config.yaml:3',
'Location: test_data/config.yaml:5',
'Location: test_data/config.yaml:13',
'Location: test_data/config.yaml:18',
]

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion tests/core/usage/filters_usage_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_local_file_success(scheme, parser):
])
secrets.scan_file('test_data/config.env')

assert not secrets
assert secrets

@staticmethod
def test_module_success(parser):
Expand Down
2 changes: 1 addition & 1 deletion tests/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def test_failed_high_entropy_string():
],
}):
assert scan_adhoc_string('bangbangintotheroom').splitlines() == [
'Base64HighEntropyString: False (3.326)',
'Base64HighEntropyString: False',
]

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/high_entropy_strings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TestHighEntropyString:
("'{secret}'", True),
# Non-quoted string
('{secret}', False),
('{secret}', True),
),
)
def test_basic(plugin, non_secret, secret, format, should_be_caught):
Expand Down

0 comments on commit be29f58

Please sign in to comment.