Example #1
0
 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)
Example #2
0
 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)