def test_write_2clause(self): """Tests write of a 2-clauses BSD license.""" skel = BSD(author='Damien Lebrun', organization='') with TempDir() as tmp: skel.write(tmp.path) self.assertEqual(skel['third_clause'], '') self.assertTrue(tmp.exists('LICENSE'))
def test_write_3clause(self): """Tests write of a 3-clauses BSD license.""" skel = BSD(author='Damien Lebrun', organization='Foo inc') with TempDir() as tmp: skel.write(tmp.path) self.assertEqual(skel['third_clause'], BSD_THIRD_CLAUSE.format(organization='Foo inc')) self.assertTrue(tmp.exists('LICENSE'))
def test_write_3clause(self): """Tests write of a 3-clauses BSD license.""" skel = BSD(author='Damien Lebrun', organization='Foo inc') with TempDir() as tmp: skel.write(tmp.path) self.assertEqual( skel['third_clause'], BSD_THIRD_CLAUSE.format(organization='Foo inc') ) self.assertTrue(tmp.exists('LICENSE'))