Skip to content

Commit 0cd3f38

Browse files
committed
Styling
Signed-off-by: Navonil Das <[email protected]>
1 parent d52c6e2 commit 0cd3f38

File tree

2 files changed

+47
-14
lines changed

2 files changed

+47
-14
lines changed

vulnerabilities/data_dump.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,7 @@ def archlinux_dump(extract_data):
127127
VulnerabilityReference.objects.create(
128128
vulnerability=vulnerability,
129129
reference_id=vulnerability_id,
130-
<<<<<<< HEAD
131-
<<<<<<< HEAD
132130
url=f'https://security.archlinux.org/{vulnerability_id}',
133-
=======
134-
url='https://security.archlinux.org/{}'.format(
135-
vulnerability_id)
136-
>>>>>>> fixed styling issue
137-
=======
138-
url='https://security.archlinux.org/{}'.format(
139-
vulnerability_id)
140-
>>>>>>> b143b7638e35e5599d23ac82415f551fe8d56d30
141131
)
142132

143133
for package_name in packages_name:

vulnerabilities/tests/test_npm.py

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,54 @@ def test_extract_data(self):
5151

5252
expected = {
5353
'package_name': 'hapi',
54-
'summary': 'This description taken from the pull request provided by Patrick Kettner.\n\n\n\nVersions 6.1.0 and earlier of hapi are vulnerable to a rosetta-flash attack, which can be used by attackers to send data across domains and break the browser same-origin-policy.\n\n\n',
5554
'vulnerability_id': 'CVE-2014-4671',
56-
'fixed_version': ['6.1.0', '6.2.0', '6.2.1', '6.2.2', '6.3.0', '6.4.0', '6.5.0', '6.5.1', '6.6.0', '6.7.0', '6.7.1', '6.8.0', '6.8.1', '6.9.0', '6.10.0', '6.11.0', '6.11.1', '7.0.0', '7.0.1', '7.1.0', '7.1.1', '7.2.0', '7.3.0', '7.4.0', '7.5.0', '7.5.1', '7.5.2', '8.0.0', '7.5.3', '8.1.0', '8.2.0', '8.3.0', '8.3.1', '8.4.0', '8.5.0', '8.5.1', '8.5.2', '8.5.3', '8.6.0', '8.6.1', '8.8.0', '8.8.1', '9.0.0', '9.0.1', '9.0.2', '9.0.3', '9.0.4', '9.1.0', '9.2.0', '9.3.0', '9.3.1', '10.0.0', '10.0.1', '10.1.0', '10.2.1', '10.4.0', '10.4.1', '10.5.0', '11.0.0', '11.0.1', '11.0.2', '11.0.3', '11.0.4', '11.0.5', '11.1.0', '11.1.1', '11.1.2', '11.1.3', '11.1.4', '12.0.0', '12.0.1', '12.1.0', '9.5.1', '13.0.0', '13.1.0', '13.2.0', '13.2.1', '13.2.2', '13.3.0', '13.4.0', '13.4.1', '13.4.2', '13.5.0', '14.0.0', '13.5.3', '14.1.0', '14.2.0', '15.0.1', '15.0.2', '15.0.3', '15.1.0', '15.1.1', '15.2.0', '16.0.0', '16.0.1', '16.0.2', '16.0.3', '16.1.0', '16.1.1', '16.2.0', '16.3.0', '16.3.1', '16.4.0', '16.4.1', '16.4.2', '16.4.3', '16.5.0', '16.5.1', '16.5.2', '16.6.0', '16.6.1', '16.6.2', '17.0.0', '17.0.1', '17.0.2', '17.1.0', '17.1.1', '17.2.0', '17.2.1', '16.6.3', '17.2.2', '17.2.3', '17.3.0', '17.3.1', '17.4.0', '17.5.0', '17.5.1', '17.5.2', '17.5.3', '17.5.4', '17.5.5', '17.6.0', '17.6.1', '17.6.2', '17.6.3', '16.6.4', '17.6.4', '16.6.5', '17.7.0', '16.7.0', '17.8.0', '17.8.1', '18.0.0', '17.8.2', '17.8.3', '18.0.1', '17.8.4', '18.1.0', '17.8.5'],
57-
'affected_version': ['0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.2.0', '0.2.1', '0.3.0', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.5.0', '0.5.1', '0.6.0', '0.6.1', '0.5.2', '0.7.0', '0.7.1', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.9.0', '0.9.1', '0.9.2', '0.10.0', '0.10.1', '0.11.0', '0.11.1', '0.11.2', '0.11.3', '0.12.0', '0.13.0', '0.13.1', '0.13.2', '0.11.4', '0.13.3', '0.14.0', '0.14.1', '0.14.2', '0.15.0', '0.15.1', '0.15.2', '0.15.3', '0.15.4', '0.15.5', '0.15.6', '0.15.7', '0.15.8', '0.15.9', '0.16.0', '1.0.0', '1.0.1', '1.0.2', '1.0.3', '1.1.0', '1.2.0', '1.3.0', '1.4.0', '1.5.0', '1.6.0', '1.6.1', '1.6.2', '1.7.0', '1.7.1', '1.7.2', '1.7.3', '1.8.0', '1.8.1', '1.8.2', '1.8.3', '1.9.0', '1.9.1', '1.9.2', '1.9.3', '1.9.4', '1.9.5', '1.9.6', '1.9.7', '1.10.0', '1.11.0', '1.11.1', '1.12.0', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.16.1', '1.17.0', '1.18.0', '1.19.0', '1.19.1', '1.19.2', '1.19.3', '1.19.4', '1.19.5', '1.20.0', '2.0.0', '2.1.0', '2.1.1', '2.1.2', '2.2.0', '2.3.0', '2.4.0', '2.5.0', '2.6.0', '3.0.0', '3.0.1', '3.0.2', '3.1.0', '4.0.0', '4.0.1', '4.0.2', '4.0.3', '4.1.0', '4.1.1', '4.1.2', '4.1.3', '4.1.4', '5.0.0', '5.1.0', '6.0.0', '6.0.1', '6.0.2'],
55+
'fixed_version': [
56+
'6.1.0', '6.2.0', '6.2.1', '6.2.2', '6.3.0', '6.4.0',
57+
'6.5.0', '6.5.1', '6.6.0', '6.7.0', '6.7.1', '6.8.0',
58+
'6.8.1', '6.9.0', '6.10.0', '6.11.0', '6.11.1', '7.0.0',
59+
'7.0.1', '7.1.0', '7.1.1', '7.2.0', '7.3.0', '7.4.0',
60+
'7.5.0', '7.5.1', '7.5.2', '8.0.0', '7.5.3', '8.1.0',
61+
'8.2.0', '8.3.0', '8.3.1', '8.4.0', '8.5.0', '8.5.1',
62+
'8.5.2', '8.5.3', '8.6.0', '8.6.1', '8.8.0', '8.8.1',
63+
'9.0.0', '9.0.1', '9.0.2', '9.0.3', '9.0.4', '9.1.0',
64+
'9.2.0', '9.3.0', '9.3.1', '10.0.0', '10.0.1', '10.1.0',
65+
'10.2.1', '10.4.0', '10.4.1', '10.5.0', '11.0.0', '11.0.1',
66+
'11.0.2', '11.0.3', '11.0.4', '11.0.5', '11.1.0', '11.1.1',
67+
'11.1.2', '11.1.3', '11.1.4', '12.0.0', '12.0.1', '12.1.0',
68+
'9.5.1', '13.0.0', '13.1.0', '13.2.0', '13.2.1', '13.2.2',
69+
'13.3.0', '13.4.0', '13.4.1', '13.4.2', '13.5.0', '14.0.0',
70+
'13.5.3', '14.1.0', '14.2.0', '15.0.1', '15.0.2', '15.0.3',
71+
'15.1.0', '15.1.1', '15.2.0', '16.0.0', '16.0.1', '16.0.2',
72+
'16.0.3', '16.1.0', '16.1.1', '16.2.0', '16.3.0', '16.3.1',
73+
'16.4.0', '16.4.1', '16.4.2', '16.4.3', '16.5.0', '16.5.1',
74+
'16.5.2', '16.6.0', '16.6.1', '16.6.2', '17.0.0', '17.0.1',
75+
'17.0.2', '17.1.0', '17.1.1', '17.2.0', '17.2.1', '16.6.3',
76+
'17.2.2', '17.2.3', '17.3.0', '17.3.1', '17.4.0', '17.5.0',
77+
'17.5.1', '17.5.2', '17.5.3', '17.5.4', '17.5.5', '17.6.0',
78+
'17.6.1', '17.6.2', '17.6.3', '16.6.4', '17.6.4', '16.6.5',
79+
'17.7.0', '16.7.0', '17.8.0', '17.8.1', '18.0.0', '17.8.2',
80+
'17.8.3', '18.0.1', '17.8.4', '18.1.0', '17.8.5'],
81+
'affected_version': [
82+
'0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.1.0',
83+
'0.1.1', '0.1.2', '0.1.3', '0.2.0', '0.2.1', '0.3.0', '0.4.0',
84+
'0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.5.0', '0.5.1', '0.6.0',
85+
'0.6.1', '0.5.2', '0.7.0', '0.7.1', '0.8.0', '0.8.1', '0.8.2',
86+
'0.8.3', '0.8.4', '0.9.0', '0.9.1', '0.9.2', '0.10.0', '0.10.1',
87+
'0.11.0', '0.11.1', '0.11.2', '0.11.3', '0.12.0', '0.13.0',
88+
'0.13.1', '0.13.2', '0.11.4', '0.13.3', '0.14.0', '0.14.1',
89+
'0.14.2', '0.15.0', '0.15.1', '0.15.2', '0.15.3', '0.15.4',
90+
'0.15.5', '0.15.6', '0.15.7', '0.15.8', '0.15.9', '0.16.0',
91+
'1.0.0', '1.0.1', '1.0.2', '1.0.3', '1.1.0', '1.2.0', '1.3.0',
92+
'1.4.0', '1.5.0', '1.6.0', '1.6.1', '1.6.2', '1.7.0', '1.7.1',
93+
'1.7.2', '1.7.3', '1.8.0', '1.8.1', '1.8.2', '1.8.3', '1.9.0',
94+
'1.9.1', '1.9.2', '1.9.3', '1.9.4', '1.9.5', '1.9.6', '1.9.7',
95+
'1.10.0', '1.11.0', '1.11.1', '1.12.0', '1.13.0', '1.14.0',
96+
'1.15.0', '1.16.0', '1.16.1', '1.17.0', '1.18.0', '1.19.0',
97+
'1.19.1', '1.19.2', '1.19.3', '1.19.4', '1.19.5', '1.20.0',
98+
'2.0.0', '2.1.0', '2.1.1', '2.1.2', '2.2.0', '2.3.0', '2.4.0',
99+
'2.5.0', '2.6.0', '3.0.0', '3.0.1', '3.0.2', '3.1.0', '4.0.0',
100+
'4.0.1', '4.0.2', '4.0.3', '4.1.0', '4.1.1', '4.1.2', '4.1.3',
101+
'4.1.4', '5.0.0', '5.1.0', '6.0.0', '6.0.1', '6.0.2'],
58102
'severity': 'moderate'
59103
}
60104
got = extract_data(test_data)[0]
@@ -65,6 +109,5 @@ def test_extract_data(self):
65109
got['affected_version']))
66110

67111
self.assertEqual(expected['package_name'], got['package_name'])
68-
self.assertEqual(expected['summary'], got['summary'])
69112
self.assertEqual(expected['severity'], got['severity'])
70113
self.assertEqual(expected['vulnerability_id'], got['vulnerability_id'])

0 commit comments

Comments
 (0)