@@ -32,8 +32,8 @@ def test_make_from_string_with_id(self) -> None:
3232 acknowledgement = unittest .mock .NonCallableMock (spec = LicenseAcknowledgement )
3333 expected = DisjunctiveLicense (id = 'bar' , text = text , url = url , acknowledgement = acknowledgement )
3434
35- with unittest .mock .patch ('cyclonedx.factory .license.spdx_fixup' , return_value = 'bar' ), \
36- unittest .mock .patch ('cyclonedx.factory .license.is_spdx_expression' , return_value = True ):
35+ with unittest .mock .patch ('cyclonedx.contrib .license.factories .spdx_fixup' , return_value = 'bar' ), \
36+ unittest .mock .patch ('cyclonedx.contrib .license.factories .is_spdx_expression' , return_value = True ):
3737 actual = LicenseFactory ().make_from_string ('foo' ,
3838 license_text = text ,
3939 license_url = url ,
@@ -47,8 +47,8 @@ def test_make_from_string_with_name(self) -> None:
4747 acknowledgement = unittest .mock .NonCallableMock (spec = LicenseAcknowledgement )
4848 expected = DisjunctiveLicense (name = 'foo' , text = text , url = url , acknowledgement = acknowledgement )
4949
50- with unittest .mock .patch ('cyclonedx.factory .license.spdx_fixup' , return_value = None ), \
51- unittest .mock .patch ('cyclonedx.factory .license.is_spdx_expression' , return_value = False ):
50+ with unittest .mock .patch ('cyclonedx.contrib .license.factories .spdx_fixup' , return_value = None ), \
51+ unittest .mock .patch ('cyclonedx.contrib .license.factories .is_spdx_expression' , return_value = False ):
5252 actual = LicenseFactory ().make_from_string ('foo' ,
5353 license_text = text ,
5454 license_url = url ,
@@ -60,8 +60,8 @@ def test_make_from_string_with_expression(self) -> None:
6060 acknowledgement = unittest .mock .NonCallableMock (spec = LicenseAcknowledgement )
6161 expected = LicenseExpression ('foo' , acknowledgement = acknowledgement )
6262
63- with unittest .mock .patch ('cyclonedx.factory .license.spdx_fixup' , return_value = None ), \
64- unittest .mock .patch ('cyclonedx.factory .license.is_spdx_expression' , return_value = True ):
63+ with unittest .mock .patch ('cyclonedx.contrib .license.factories .spdx_fixup' , return_value = None ), \
64+ unittest .mock .patch ('cyclonedx.contrib .license.factories .is_spdx_expression' , return_value = True ):
6565 actual = LicenseFactory ().make_from_string ('foo' ,
6666 license_acknowledgement = acknowledgement )
6767
@@ -73,14 +73,14 @@ def test_make_with_id(self) -> None:
7373 acknowledgement = unittest .mock .NonCallableMock (spec = LicenseAcknowledgement )
7474 expected = DisjunctiveLicense (id = 'bar' , text = text , url = url , acknowledgement = acknowledgement )
7575
76- with unittest .mock .patch ('cyclonedx.factory .license.spdx_fixup' , return_value = 'bar' ):
76+ with unittest .mock .patch ('cyclonedx.contrib .license.factories .spdx_fixup' , return_value = 'bar' ):
7777 actual = LicenseFactory ().make_with_id (spdx_id = 'foo' , text = text , url = url , acknowledgement = acknowledgement )
7878
7979 self .assertEqual (expected , actual )
8080
8181 def test_make_with_id_raises (self ) -> None :
8282 with self .assertRaises (InvalidSpdxLicenseException , msg = 'foo' ):
83- with unittest .mock .patch ('cyclonedx.factory .license.spdx_fixup' , return_value = None ):
83+ with unittest .mock .patch ('cyclonedx.contrib .license.factories .spdx_fixup' , return_value = None ):
8484 LicenseFactory ().make_with_id (spdx_id = 'foo' )
8585
8686 def test_make_with_name (self ) -> None :
@@ -94,11 +94,11 @@ def test_make_with_name(self) -> None:
9494 def test_make_with_expression (self ) -> None :
9595 acknowledgement = unittest .mock .NonCallableMock (spec = LicenseAcknowledgement )
9696 expected = LicenseExpression ('foo' , acknowledgement = acknowledgement )
97- with unittest .mock .patch ('cyclonedx.factory .license.is_spdx_expression' , return_value = True ):
97+ with unittest .mock .patch ('cyclonedx.contrib .license.factories .is_spdx_expression' , return_value = True ):
9898 actual = LicenseFactory ().make_with_expression (expression = 'foo' , acknowledgement = acknowledgement )
9999 self .assertEqual (expected , actual )
100100
101101 def test_make_with_expression_raises (self ) -> None :
102102 with self .assertRaises (InvalidLicenseExpressionException , msg = 'foo' ):
103- with unittest .mock .patch ('cyclonedx.factory .license.is_spdx_expression' , return_value = False ):
103+ with unittest .mock .patch ('cyclonedx.contrib .license.factories .is_spdx_expression' , return_value = False ):
104104 LicenseFactory ().make_with_expression ('foo' )
0 commit comments