Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small syntax and formatting cleanup #676

Merged
merged 1 commit into from
Dec 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 3 additions & 6 deletions tests/functional/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,11 @@ def test_mark_safe(self):

def test_exec(self):
'''Test the `exec` example.'''
filename = 'exec.py'
expect = {
'SEVERITY': {'UNDEFINED': 0, 'LOW': 0, 'MEDIUM': 1, 'HIGH': 0},
'CONFIDENCE': {'UNDEFINED': 0, 'LOW': 0, 'MEDIUM': 0,
'HIGH': 1}
'CONFIDENCE': {'UNDEFINED': 0, 'LOW': 0, 'MEDIUM': 0, 'HIGH': 1}
}
self.check_example(filename, expect)
self.check_example('exec.py', expect)

def test_hardcoded_passwords(self):
'''Test for hard-coded passwords.'''
Expand Down Expand Up @@ -276,12 +274,11 @@ def test_subdirectory_okay(self):

def test_os_chmod(self):
'''Test setting file permissions.'''
filename = 'os-chmod.py'
expect = {
'SEVERITY': {'UNDEFINED': 0, 'LOW': 0, 'MEDIUM': 2, 'HIGH': 8},
'CONFIDENCE': {'UNDEFINED': 0, 'LOW': 0, 'MEDIUM': 1, 'HIGH': 9}
}
self.check_example(filename, expect)
self.check_example('os-chmod.py', expect)

def test_os_exec(self):
'''Test for `os.exec*`.'''
Expand Down