Skip to content

Commit

Permalink
fix: Use adulau instead of admin for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Nov 18, 2024
1 parent 764adf2 commit d632d8b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/test_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,18 @@ def test_get_comments_public(self) -> None:
for comment in comments['data']:
self.assertEqual(comment['vulnerability'], 'CVE-2024-20401')

comments = self.client.get_comments(author='admin')
comments = self.client.get_comments(author='adulau')
self.assertTrue(len(comments['data']) >= 1)
for comment in comments['data']:
self.assertEqual(comment['author']['login'], 'admin')
self.assertEqual(comment['author']['login'], 'adulau')

comments = self.client.get_comments(uuid='a309d024-2714-4a81-a425-60f83f6d5740',
vuln_id='CVE-2024-20401',
author='admin')
author='adulau')
self.assertTrue(len(comments['data']) == 1)
self.assertEqual(comments['data'][0]['uuid'], 'a309d024-2714-4a81-a425-60f83f6d5740')
self.assertEqual(comments['data'][0]['vulnerability'], 'CVE-2024-20401')
self.assertEqual(comments['data'][0]['author']['login'], 'admin')
self.assertEqual(comments['data'][0]['author']['login'], 'adulau')

def test_comments_local(self) -> None:
if not self.admin_token:
Expand Down Expand Up @@ -181,18 +181,18 @@ def test_get_bundles_public(self) -> None:
for bundle in bundles['data']:
self.assertTrue('CVE-2024-39573' in bundle['related_vulnerabilities'])

bundles = self.client.get_bundles(author='admin')
bundles = self.client.get_bundles(author='adulau')
self.assertTrue(len(bundles['data']) >= 1)
for bundle in bundles['data']:
self.assertEqual(bundle['author']['login'], 'admin')
self.assertEqual(bundle['author']['login'], 'adulau')

bundles = self.client.get_bundles(uuid='a23cbcad-e890-4df8-8736-9332ed4c3d47',
vuln_id='CVE-2024-39573',
author='admin')
author='adulau')
self.assertTrue(len(bundles['data']) == 1)
self.assertEqual(bundles['data'][0]['uuid'], 'a23cbcad-e890-4df8-8736-9332ed4c3d47')
self.assertTrue('CVE-2024-39573' in bundles['data'][0]['related_vulnerabilities'])
self.assertEqual(bundles['data'][0]['author']['login'], 'admin')
self.assertEqual(bundles['data'][0]['author']['login'], 'adulau')

def test_bundles_local(self) -> None:
if not self.admin_token:
Expand Down

0 comments on commit d632d8b

Please sign in to comment.