Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[issue-420] fix order of mocks to match input arguments #421

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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