@@ -122,11 +122,20 @@ def test_invalid_parameter(self):
122
122
123
123
@unittest .skipUnless (LONG_TESTS () > 0 , "Skipping long tests" )
124
124
def test_update_flags (self ):
125
- assert main (["cve-bin-tool" , "-x" , "-u" , "never" , self .tempdir ]) != 0
126
- assert main (["cve-bin-tool" , "-x" , "--update" , "daily" , self .tempdir ]) != 0
127
- assert main (["cve-bin-tool" , "-x" , "-u" , "now" , self .tempdir ]) != 0
125
+ assert (
126
+ main (["cve-bin-tool" , "-x" , "-u" , "never" , "-n" , "json" , self .tempdir ]) != 0
127
+ )
128
+ assert (
129
+ main (
130
+ ["cve-bin-tool" , "-x" , "--update" , "daily" , "-n" , "json" , self .tempdir ]
131
+ )
132
+ != 0
133
+ )
134
+ assert (
135
+ main (["cve-bin-tool" , "-x" , "-u" , "now" , "-n" , "json" , self .tempdir ]) != 0
136
+ )
128
137
with pytest .raises (SystemExit ) as e :
129
- main (["cve-bin-tool" , "-u" , "whatever" , self .tempdir ])
138
+ main (["cve-bin-tool" , "-u" , "whatever" , "-n" , "json" , self .tempdir ])
130
139
assert e .value .args [0 ] == - 2
131
140
132
141
@staticmethod
@@ -194,7 +203,7 @@ def test_update(self, caplog):
194
203
test_path = os .path .join (os .path .abspath (os .path .dirname (__file__ )), "csv" )
195
204
196
205
with caplog .at_level (logging .INFO ):
197
- main (["cve-bin-tool" , "-u" , "never" , test_path ])
206
+ main (["cve-bin-tool" , "-u" , "never" , "-n" , "json" , test_path ])
198
207
assert (
199
208
"cve_bin_tool" ,
200
209
logging .WARNING ,
@@ -203,7 +212,9 @@ def test_update(self, caplog):
203
212
caplog .clear ()
204
213
205
214
with caplog .at_level (logging .DEBUG ):
206
- main (["cve-bin-tool" , "-l" , "debug" , "-u" , "daily" , test_path ])
215
+ main (
216
+ ["cve-bin-tool" , "-l" , "debug" , "-u" , "daily" , "-n" , "json" , test_path ]
217
+ )
207
218
assert (
208
219
"cve_bin_tool.CVEDB" ,
209
220
logging .INFO ,
@@ -216,7 +227,7 @@ def test_update(self, caplog):
216
227
caplog .clear ()
217
228
218
229
with caplog .at_level (logging .DEBUG ):
219
- main (["cve-bin-tool" , "-l" , "debug" , "-u" , "now" , test_path ])
230
+ main (["cve-bin-tool" , "-l" , "debug" , "-u" , "now" , "-n" , "json" , test_path ])
220
231
db_path = DISK_LOCATION_DEFAULT
221
232
assert (
222
233
"cve_bin_tool.CVEDB" ,
@@ -230,7 +241,9 @@ def test_update(self, caplog):
230
241
caplog .clear ()
231
242
232
243
with caplog .at_level (logging .DEBUG ):
233
- main (["cve-bin-tool" , "-l" , "debug" , "-u" , "latest" , test_path ])
244
+ main (
245
+ ["cve-bin-tool" , "-l" , "debug" , "-u" , "latest" , "-n" , "json" , test_path ]
246
+ )
234
247
assert (
235
248
"cve_bin_tool.CVEDB" ,
236
249
logging .DEBUG ,
0 commit comments