def test_mit_type(self): license = detect_license(reader = ['The MIT License', 'Blah blah blah.']) self.assertEquals(license['type'], 'MIT')
def test_year_and_author(self): license = detect_license(reader = ['Copyright 2012 Joe Programmer']) self.assertEquals(license['author'], 'Joe Programmer') self.assertEquals(license['year'], '2012')
def test_agpl3_type(self): license = detect_license(reader = ['GNU AFFERO GENERAL PUBLIC LICENSE', 'Version 3, 19 November 2007']) self.assertEquals(license['type'], 'AGPL') self.assertEquals(license['version'], '3')
def test_gpl2_tiny_type(self): license = detect_license(reader = ['GPL version 2']) self.assertEquals(license['type'], 'GPL') self.assertEquals(license['version'], '2')
def test_gpl2_type(self): license = detect_license(reader = ['GNU GENERAL PUBLIC LICENSE', 'Version 2, June 1991']) self.assertEquals(license['type'], 'GPL') self.assertEquals(license['version'], '2')
def test_gpl_type(self): license = detect_license(reader = ['GNU GENERAL PUBLIC LICENSE', 'Blah blah blah.']) self.assertEquals(license['type'], 'GPL')