Пример #1
0
 def base_create_dep_objs(cls):
     """
     Create all objects that Files depend on.
     """
     trans = Transactions()
     TestTransactions.base_create_dep_objs()
     trans.from_hash(SAMPLE_TRANSACTION_HASH)
     trans.save(force_insert=True)
Пример #2
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)
Пример #3
0
 def dependent_cls(cls):
     """
     Return dependent classes for the TransactionKeyValue object
     """
     ret = [TransactionKeyValue]
     ret += TestTransactions.dependent_cls()
     ret += TestValues.dependent_cls()
     ret += TestKeys.dependent_cls()
     return ret
Пример #4
0
 def dependent_cls(cls):
     """
     Return dependent classes for the Files object
     """
     return TestTransactions.dependent_cls() + [Files]