Commit a0416aa
committed
fix(test): update TestSaveVulnerabilityIds mock for bulk_create
The test mocked Vulnerability_Id.save (individual saves) but
save_vulnerability_ids now uses bulk_create. Django's bulk_create
validates FK references before issuing SQL, raising ValueError when
the finding has no pk. Mock bulk_create instead and assert on the
deduplicated object list passed to it.1 parent 7900fc3 commit a0416aa
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
| 223 | + | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
234 | 237 | | |
235 | 238 | | |
236 | 239 | | |
| |||
0 commit comments