Beispiel #1
0
    def test_license_text_extracted_from_license_text_file(self):
        expected = '''Tester holds the copyright for test component. Tester relinquishes copyright of
this software and releases the component to Public Domain.

* Email [email protected] for any questions'''

        test_file = join(TESTDATA_DIR, 'attrib/license_text.ABOUT')
        about_file = AboutFile(test_file)
        result = about_file.license_text()
        self.assertEqual(expected, result)
Beispiel #2
0
 def test_license_text_returns_empty_string_when_ref_file_doesnt_exist(self):
     expected = ''
     test_file = join(TESTDATA_DIR, 'attrib/missing_notice_license_files.ABOUT')
     about_file = AboutFile(test_file)
     result = about_file.license_text()
     self.assertEqual(result, expected)
Beispiel #3
0
 def test_license_text_returns_empty_string_when_no_field_present(self):
     expected = ''
     test_file = join(TESTDATA_DIR, 'attrib/no_text_file_field.ABOUT')
     about_file = AboutFile(test_file)
     result = about_file.license_text()
     self.assertEqual(result, expected)