3232 Version ,
3333)
3434
35+ spdx_licensing = get_spdx_licensing ()
36+
37+
3538# Utility methods to create data model instances. All properties have valid defaults, so they don't need to be
3639# specified unless relevant for the test.
3740
@@ -88,7 +91,7 @@ def file_fixture(
8891 spdx_id = "SPDXRef-File" ,
8992 checksums = None ,
9093 file_types = None ,
91- license_concluded = get_spdx_licensing () .parse ("MIT and GPL-2.0" ),
94+ license_concluded = spdx_licensing .parse ("MIT and GPL-2.0" ),
9295 license_info_in_file = None ,
9396 license_comment = "licenseComment" ,
9497 copyright_text = "copyrightText" ,
@@ -100,7 +103,7 @@ def file_fixture(
100103 checksums = [checksum_fixture ()] if checksums is None else checksums
101104 file_types = [FileType .TEXT ] if file_types is None else file_types
102105 license_info_in_file = (
103- [get_spdx_licensing () .parse ("MIT" ), get_spdx_licensing () .parse ("GPL-2.0" ), SpdxNoAssertion ()]
106+ [spdx_licensing .parse ("MIT" ), spdx_licensing .parse ("GPL-2.0" ), SpdxNoAssertion ()]
104107 if license_info_in_file is None
105108 else license_info_in_file
106109 )
@@ -135,9 +138,9 @@ def package_fixture(
135138 checksums = None ,
136139 homepage = "https://homepage.com" ,
137140 source_info = "sourceInfo" ,
138- license_concluded = get_spdx_licensing () .parse ("MIT and GPL-2.0" ),
141+ license_concluded = spdx_licensing .parse ("MIT and GPL-2.0" ),
139142 license_info_from_files = None ,
140- license_declared = get_spdx_licensing () .parse ("MIT and GPL-2.0" ),
143+ license_declared = spdx_licensing .parse ("MIT and GPL-2.0" ),
141144 license_comment = "packageLicenseComment" ,
142145 copyright_text = "packageCopyrightText" ,
143146 summary = "packageSummary" ,
@@ -152,7 +155,7 @@ def package_fixture(
152155) -> Package :
153156 checksums = [checksum_fixture ()] if checksums is None else checksums
154157 license_info_from_files = (
155- [get_spdx_licensing () .parse ("MIT" ), get_spdx_licensing () .parse ("GPL-2.0" ), SpdxNoAssertion ()]
158+ [spdx_licensing .parse ("MIT" ), spdx_licensing .parse ("GPL-2.0" ), SpdxNoAssertion ()]
156159 if license_info_from_files is None
157160 else license_info_from_files
158161 )
@@ -208,7 +211,7 @@ def snippet_fixture(
208211 file_spdx_id = "SPDXRef-File" ,
209212 byte_range = (1 , 2 ),
210213 line_range = (3 , 4 ),
211- license_concluded = get_spdx_licensing () .parse ("MIT and GPL-2.0" ),
214+ license_concluded = spdx_licensing .parse ("MIT and GPL-2.0" ),
212215 license_info_in_snippet = None ,
213216 license_comment = "snippetLicenseComment" ,
214217 copyright_text = "licenseCopyrightText" ,
@@ -217,7 +220,7 @@ def snippet_fixture(
217220 attribution_texts = None ,
218221) -> Snippet :
219222 license_info_in_snippet = (
220- [get_spdx_licensing () .parse ("MIT" ), get_spdx_licensing () .parse ("GPL-2.0" ), SpdxNone ()]
223+ [spdx_licensing .parse ("MIT" ), spdx_licensing .parse ("GPL-2.0" ), SpdxNone ()]
221224 if license_info_in_snippet is None
222225 else license_info_in_snippet
223226 )
0 commit comments