fix: Use adulau instead of admin for tests

This commit is contained in:
Raphaël Vinot 2024-11-18 19:50:24 +01:00
parent 764adf228e
commit d632d8b27e

View file

@ -92,18 +92,18 @@ class TestPublic(unittest.TestCase):
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:
@ -181,18 +181,18 @@ class TestPublic(unittest.TestCase):
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: