Skip to content

Commit

Permalink
Fixup dependency scanner for upcoming upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Bownairo committed May 15, 2024
1 parent 93150ee commit 34e12a9
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ def test_findings_helper_no_vulnerabilities(npm_test):
repository = "ic"
project = Project("ic", "ic")
fake_npm = FakeNPM(1)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output

findings = npm_test.get_findings(repository, project, DEFAULT_NODE_VERSION)
assert not findings
Expand All @@ -567,8 +567,8 @@ def test_findings_helper_one_finding(npm_test):
repository = "ic"
project = Project("ic", "ic")
fake_npm = FakeNPM(2)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output

findings = npm_test.get_findings(repository, project, DEFAULT_NODE_VERSION)
assert len(findings) == 1
Expand Down Expand Up @@ -617,8 +617,8 @@ def test_findings_helper_vulnerable_dependency_not_in_range(npm_test):
repository = "ic"
project = Project("ic", "ic")
fake_npm = FakeNPM(3)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output

findings = npm_test.get_findings(repository, project, DEFAULT_NODE_VERSION)
assert not findings
Expand All @@ -628,8 +628,8 @@ def test_findings_helper_transitive_vulnerability(npm_test):
repository = "ic"
project = Project("ic", "ic")
fake_npm = FakeNPM(4)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output.__get__(npm_test, NPMDependencyManager)
npm_test._NPMDependencyManager__npm_audit_output = fake_npm.npm_audit_output
npm_test._NPMDependencyManager__npm_list_output = fake_npm.npm_list_output

findings = npm_test.get_findings(repository, project, DEFAULT_NODE_VERSION)
assert not findings

0 comments on commit 34e12a9

Please sign in to comment.