@@ -33,7 +33,7 @@ def test_make_from_string_with_id(self) -> None:
33
33
expected = DisjunctiveLicense (id = 'bar' , text = text , url = url , acknowledgement = acknowledgement )
34
34
35
35
with unittest .mock .patch ('cyclonedx.factory.license.spdx_fixup' , return_value = 'bar' ), \
36
- unittest .mock .patch ('cyclonedx.factory.license.is_spdx_compound_expression ' , return_value = True ):
36
+ unittest .mock .patch ('cyclonedx.factory.license.is_spdx_expression ' , return_value = True ):
37
37
actual = LicenseFactory ().make_from_string ('foo' ,
38
38
license_text = text ,
39
39
license_url = url ,
@@ -48,7 +48,7 @@ def test_make_from_string_with_name(self) -> None:
48
48
expected = DisjunctiveLicense (name = 'foo' , text = text , url = url , acknowledgement = acknowledgement )
49
49
50
50
with unittest .mock .patch ('cyclonedx.factory.license.spdx_fixup' , return_value = None ), \
51
- unittest .mock .patch ('cyclonedx.factory.license.is_spdx_compound_expression ' , return_value = False ):
51
+ unittest .mock .patch ('cyclonedx.factory.license.is_spdx_expression ' , return_value = False ):
52
52
actual = LicenseFactory ().make_from_string ('foo' ,
53
53
license_text = text ,
54
54
license_url = url ,
@@ -61,7 +61,7 @@ def test_make_from_string_with_expression(self) -> None:
61
61
expected = LicenseExpression ('foo' , acknowledgement = acknowledgement )
62
62
63
63
with unittest .mock .patch ('cyclonedx.factory.license.spdx_fixup' , return_value = None ), \
64
- unittest .mock .patch ('cyclonedx.factory.license.is_spdx_compound_expression ' , return_value = True ):
64
+ unittest .mock .patch ('cyclonedx.factory.license.is_spdx_expression ' , return_value = True ):
65
65
actual = LicenseFactory ().make_from_string ('foo' ,
66
66
license_acknowledgement = acknowledgement )
67
67
@@ -94,11 +94,11 @@ def test_make_with_name(self) -> None:
94
94
def test_make_with_expression (self ) -> None :
95
95
acknowledgement = unittest .mock .NonCallableMock (spec = LicenseAcknowledgement )
96
96
expected = LicenseExpression ('foo' , acknowledgement = acknowledgement )
97
- with unittest .mock .patch ('cyclonedx.factory.license.is_spdx_compound_expression ' , return_value = True ):
97
+ with unittest .mock .patch ('cyclonedx.factory.license.is_spdx_expression ' , return_value = True ):
98
98
actual = LicenseFactory ().make_with_expression (expression = 'foo' , acknowledgement = acknowledgement )
99
99
self .assertEqual (expected , actual )
100
100
101
101
def test_make_with_expression_raises (self ) -> None :
102
102
with self .assertRaises (InvalidLicenseExpressionException , msg = 'foo' ):
103
- with unittest .mock .patch ('cyclonedx.factory.license.is_spdx_compound_expression ' , return_value = False ):
103
+ with unittest .mock .patch ('cyclonedx.factory.license.is_spdx_expression ' , return_value = False ):
104
104
LicenseFactory ().make_with_expression ('foo' )
0 commit comments