Пример #1
0
	def testDumpToFile(self):
			
		path = "pickled_dump.p"

		redis_utils.dump_to_file(path = path, redis_conn = redis)
		
		# now lets unpickle the data and ensure it's integrity
		dump_data = pickle.load(open(path, "rb"))

		# check and verify the dump data was properly pickled 
		TestDump.checkDumpData(dump_data)

		# now lets clean up after ourselves here ... 
		os.remove(path)
Пример #2
0
	def setup(self):
	
		seed_database(redis)
		redis_utils.dump_to_file(self.path, redis_conn = redis)
		redis_utils.clear(redis_conn = redis)