def test_read_file(self): f = tools.new_temp_file(self.test_string) data = tools.read_file(f) self.assertEqual(self.test_string, data) tools.delete_file(f) data = tools.read_file(f) self.assertEqual(data, 'ERROR: Cannot read file %s'%(f))
def test_create_delete_file(self): f = tools.new_temp_file(self.test_string) self.assertNotEqual(f, None) tools.delete_file(f) data = tools.read_file(f) self.assertEqual(data, 'ERROR: Cannot read file %s'%(f))