def base_create_dep_objs(cls):
     """Create all objects that TransactionKeyValue need."""
     trans = Transactions()
     tool = AnalyticalTools()
     TestTransactions.base_create_dep_objs()
     trans.from_hash(SAMPLE_TRANSACTION_HASH)
     trans.save(force_insert=True)
     TestAnalyticalTools.base_create_dep_objs()
     tool.from_hash(SAMPLE_TOOL_HASH)
     tool.save(force_insert=True)
Пример #2
0
 def base_create_dep_objs(cls):
     """Build the object and make dependent user object."""
     auth_person = Users()
     TestUsers.base_create_dep_objs()
     auth_person.from_hash(SAMPLE_CREATOR_HASH)
     auth_person.save(force_insert=True)
     rel_trans = Transactions()
     TestTransactions.base_create_dep_objs()
     rel_trans.from_hash(SAMPLE_TRANSACTION_HASH)
     rel_trans.save(force_insert=True)
 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)
Пример #4
0
 def base_create_dep_objs(cls):
     """Build the object and make dependent user object."""
     rel = Relationships()
     TestRelationships.base_create_dep_objs()
     rel.from_hash(SAMPLE_RELATIONSHIP_HASH)
     rel.save(force_insert=True)
     user3 = Users()
     TestUsers.base_create_dep_objs()
     user3.from_hash(SAMPLE_CREATOR_HASH)
     user3.save(force_insert=True)
     rel_trans = Transactions()
     TestTransactions.base_create_dep_objs()
     rel_trans.from_hash(SAMPLE_TRANSACTION_HASH)
     rel_trans.save(force_insert=True)
Пример #5
0
 def base_create_dep_objs(cls):
     """Build the object and make dependent user object."""
     proj = Projects()
     TestProjects.base_create_dep_objs()
     proj.from_hash(SAMPLE_PROJECT_HASH)
     proj.save(force_insert=True)
     submitter = Users()
     TestUsers.base_create_dep_objs()
     submitter.from_hash(SAMPLE_SUBMITTER_HASH)
     submitter.save(force_insert=True)
     atool = AnalyticalTools()
     TestAnalyticalTools.base_create_dep_objs()
     atool.from_hash(SAMPLE_TOOL_HASH)
     atool.save(force_insert=True)
     trans = Transactions()
     TestTransactions.base_create_dep_objs()
     trans.from_hash(SAMPLE_TRANSACTION_HASH)
     trans.save(force_insert=True)
Пример #6
0
 def base_create_dep_objs(cls):
     """Build the object and make dependent user object."""
     submitter, _created = Users().get_or_create(
         id=SAMPLE_SUBMITTER_HASH['_id'])
     TestUsers.base_create_dep_objs()
     submitter.from_hash(SAMPLE_SUBMITTER_HASH)
     submitter.save()
     prop = Proposals()
     TestProposals.base_create_dep_objs()
     prop.from_hash(SAMPLE_PROPOSAL_HASH)
     prop.save(force_insert=True)
     inst = Instruments()
     TestInstruments.base_create_dep_objs()
     inst.from_hash(SAMPLE_INSTRUMENT_HASH)
     inst.save(force_insert=True)
     trans = Transactions()
     TestTransactions.base_create_dep_objs()
     trans.from_hash(SAMPLE_TRANSACTION_HASH)
     trans.save(force_insert=True)
Пример #7
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)