Skip to content

Commit

Permalink
[issue-420] fix order of mocks to match input arguments
Browse files Browse the repository at this point in the history
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
  • Loading branch information
meretp committed Jan 11, 2023
1 parent 11727e2 commit 0d1dcf5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/model/test_creation_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from spdx.model.version import Version


@mock.patch('spdx.model.actor.Actor', autospec=True)
@mock.patch('spdx.model.external_document_ref.ExternalDocumentRef', autospec=True)
@mock.patch('spdx.model.actor.Actor', autospec=True)
def test_correct_initialization(actor, ext_ref):
creation_info = CreationInfo("version", "id", "name", "namespace", [actor, actor], datetime(2022, 1, 1),
"creator_comment", "CC0-1.1", [ext_ref, ext_ref], Version(6, 3), "doc_comment")
Expand Down
12 changes: 6 additions & 6 deletions tests/model/test_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from spdx.model.document import Document


@mock.patch('spdx.model.document.CreationInfo', autospec=True)
@mock.patch('spdx.model.package.Package', autospec=True)
@mock.patch('spdx.model.file.File', autospec=True)
@mock.patch('spdx.model.snippet.Snippet', autospec=True)
@mock.patch('spdx.model.annotation.Annotation', autospec=True)
@mock.patch('spdx.model.relationship.Relationship', autospec=True)
@mock.patch('spdx.model.extracted_licensing_info.ExtractedLicensingInfo', autospec=True)
@mock.patch('spdx.model.relationship.Relationship', autospec=True)
@mock.patch('spdx.model.annotation.Annotation', autospec=True)
@mock.patch('spdx.model.snippet.Snippet', autospec=True)
@mock.patch('spdx.model.file.File', autospec=True)
@mock.patch('spdx.model.package.Package', autospec=True)
@mock.patch('spdx.model.document.CreationInfo', autospec=True)
def test_correct_initialization(creation_info, package, file, snippet, annotation, relationship,
extracted_lic):
document = Document(creation_info, [package, package], [file, file], [snippet, snippet], [annotation, annotation],
Expand Down
6 changes: 3 additions & 3 deletions tests/model/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
from spdx.model.spdx_none import SpdxNone


@mock.patch('spdx.model.actor.Actor', autospec=True)
@mock.patch('spdx.model.package.PackageVerificationCode', autospec=True)
@mock.patch('spdx.model.checksum.Checksum', autospec=True)
@mock.patch('spdx.model.package.ExternalPackageRef', autospec=True)
@mock.patch('spdx.model.checksum.Checksum', autospec=True)
@mock.patch('spdx.model.package.PackageVerificationCode', autospec=True)
@mock.patch('spdx.model.actor.Actor', autospec=True)
def test_correct_initialization(actor, verif_code, checksum, ext_ref):
package = Package("id", "name", SpdxNoAssertion(), "version", "file_name", SpdxNoAssertion(), actor, True,
verif_code, [checksum], "homepage", "source_info", None, [LicenseExpression("expression")],
Expand Down

0 comments on commit 0d1dcf5

Please sign in to comment.