예제 #1
0
 def base_create_dep_objs(cls):
     """
     Create all objects that TransactionKeyValue need.
     """
     trans = Transactions()
     keys = Keys()
     values = Values()
     TestTransactions.base_create_dep_objs()
     trans.from_hash(SAMPLE_TRANSACTION_HASH)
     trans.save(force_insert=True)
     TestKeys.base_create_dep_objs()
     keys.from_hash(SAMPLE_KEY_HASH)
     keys.save(force_insert=True)
     TestValues.base_create_dep_objs()
     values.from_hash(SAMPLE_VALUE_HASH)
     values.save(force_insert=True)
예제 #2
0
 def base_create_dep_objs(cls):
     """
     Create all objects that FileKeyValue need.
     """
     keys = Keys()
     TestKeys.base_create_dep_objs()
     keys.from_hash(SAMPLE_KEY_HASH)
     keys.save(force_insert=True)
     values = Values()
     TestValues.base_create_dep_objs()
     values.from_hash(SAMPLE_VALUE_HASH)
     values.save(force_insert=True)
     files = Files()
     TestFiles.base_create_dep_objs()
     files.from_hash(SAMPLE_FILE_HASH)
     files.save(force_insert=True)