File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #
2+ # Copyright (c) nexB Inc. and others. All rights reserved.
3+ # VulnerableCode is a trademark of nexB Inc.
4+ # SPDX-License-Identifier: Apache-2.0
5+ # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+ # See https://github.com/nexB/vulnerablecode for support or download.
7+ # See https://aboutcode.org for more information about nexB OSS projects.
8+ #
9+
10+ import datetime
11+
12+ import pytest
13+
14+ from vulnerabilities .importers .nvd import NVDImporter
15+ from vulnerabilities .improve_runner import ImproveRunner
16+ from vulnerabilities .improvers .importer_specific_improver import NVDImprover
17+ from vulnerabilities .models import Advisory
18+ from vulnerabilities .models import Alias
19+
20+
21+ @pytest .mark .django_db
22+ def test_improvement_of_importer_specific_advisories ():
23+ Advisory .objects .create (
24+ aliases = ["CVE-2021-22" ],
25+ summary = "TEST" ,
26+ created_by = NVDImporter .qualified_name ,
27+ date_collected = datetime .datetime .now (tz = datetime .timezone .utc ),
28+ )
29+ ImproveRunner (NVDImprover ).run ()
30+ alias = Alias .objects .filter (alias = "CVE-2021-22" ).first ()
31+ assert alias is not None
You can’t perform that action at this time.
0 commit comments