Skip to content

Commit 8ab3a43

Browse files
committed
Format
1 parent f58709d commit 8ab3a43

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

dev_tools/prepared_env_security_test.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
21
import unittest
32
from unittest.mock import patch, MagicMock
43
from dev_tools.prepared_env import PreparedEnv
54
from dev_tools.github_repository import GithubRepository
65

6+
77
class TestPreparedEnvSecurity(unittest.TestCase):
88
@patch('requests.post')
99
def test_report_status_to_github_token_in_header(self, mock_post):
@@ -27,7 +27,12 @@ def test_report_status_to_github_token_in_header(self, mock_post):
2727
self.assertNotIn('access_token=my-token', url, "Token should not be passed in the URL")
2828

2929
# Security check: Token should be in the Authorization header
30-
self.assertEqual(headers.get('Authorization'), 'token my-token', "Token should be passed in the Authorization header")
30+
self.assertEqual(
31+
headers.get('Authorization'),
32+
'token my-token',
33+
"Token should be passed in the Authorization header",
34+
)
35+
3136

3237
if __name__ == '__main__':
3338
unittest.main()

0 commit comments

Comments
 (0)