File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 2020from unittest import TestCase
2121
2222from cyclonedx .factory .license import LicenseFactory
23+ from cyclonedx .model import Encoding
2324from cyclonedx .model .license import DisjunctiveLicense , LicenseAcknowledgement
2425from ddt import ddt , named_data
2526
@@ -41,6 +42,7 @@ def test_license_dict_text(self) -> None:
4142 lic = licenses [0 ]
4243 self .assertIsInstance (lic , DisjunctiveLicense )
4344 self .assertIsNone (lic .id )
45+ self .assertIsNone (lic .text .encoding )
4446 self .assertEqual (lic .text .content , 'This is the license text.' )
4547 self .assertEqual (lic .acknowledgement , LicenseAcknowledgement .DECLARED )
4648
@@ -57,7 +59,8 @@ def test_license_dict_file(self) -> None:
5759 self .assertEqual (len (licenses ), 1 )
5860 lic = licenses [0 ]
5961 self .assertIsInstance (lic , DisjunctiveLicense )
60- self .assertIsNotNone (lic .text .content )
62+ self .assertIs (lic .text .encoding , Encoding .BASE_64 )
63+ self .assertEqual (lic .text .content , 'RmlsZSBsaWNlbnNlIHRleHQ=' )
6164 self .assertEqual (lic .acknowledgement , LicenseAcknowledgement .DECLARED )
6265
6366 @named_data (
You can’t perform that action at this time.
0 commit comments