def test_good_file(self,): write_tmp_file(self.tmpfile, self.file_header) f = database.load_database(self.tmpfile) f = open(f,'r') self.assertTrue(hasattr(f,'read')) os.remove(self.tmpfile)
def test_bad_file(self): write_tmp_file(self.tmpfile,"Scrabdoodle\n") with self.assertRaises(SystemExit): f = database.load_database(self.tmpfile) os.remove(self.tmpfile)