Exemplo n.º 1
0
 def test_notice_text_returns_empty_string_when_no_field_present(self):
     test_file = join(TESTDATA_DIR, 'attrib/no_text_file_field.ABOUT')
     about_file = AboutFile(test_file)
     result = about_file.notice_text()
     expected = ''
     self.assertEqual(result, expected)
Exemplo n.º 2
0
 def test_notice_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.notice_text()
     self.assertEqual(result, expected)
Exemplo n.º 3
0
 def test_notice_text_extacted_from_notice_text_file(self):
     expected = '''Test component is released to Public Domain.'''
     test_file = join(TESTDATA_DIR, 'attrib/license_text.ABOUT')
     about_file = AboutFile(test_file)
     result = about_file.notice_text()
     self.assertEqual(result, expected)