コード例 #1
0
 def base_create_dep_objs(cls):
     """
     Create all objects that InstrumentCustodian need.
     """
     inst = Instruments()
     TestInstruments.base_create_dep_objs()
     inst.from_hash(SAMPLE_INSTRUMENT_HASH)
     inst.save(force_insert=True)
     custodian = Users()
     TestUsers.base_create_dep_objs()
     custodian.from_hash(SAMPLE_USER_HASH)
     custodian.save(force_insert=True)
コード例 #2
0
 def base_create_dep_objs(cls):
     """
     Create all objects that FileKeyValue need.
     """
     prop2 = Proposals()
     TestProposals.base_create_dep_objs()
     prop2.from_hash(SAMPLE_PROPOSAL_HASH)
     prop2.save(force_insert=True)
     inst = Instruments()
     TestInstruments.base_create_dep_objs()
     inst.from_hash(SAMPLE_INSTRUMENT_HASH)
     inst.save(force_insert=True)
コード例 #3
0
 def base_create_dep_objs(cls):
     """
     Create all objects that InstrumentGroup need.
     """
     groups = Groups()
     TestGroups.base_create_dep_objs()
     groups.from_hash(SAMPLE_GROUP_HASH)
     groups.save(force_insert=True)
     inst = Instruments()
     TestInstruments.base_create_dep_objs()
     inst.from_hash(SAMPLE_INSTRUMENT_HASH)
     inst.save(force_insert=True)
コード例 #4
0
 def base_create_dep_objs(cls):
     """
     Build the object and make dependent user object.
     """
     submitter = Users()
     TestUsers.base_create_dep_objs()
     submitter.from_hash(SAMPLE_SUBMITTER_HASH)
     submitter.save(force_insert=True)
     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)
コード例 #5
0
 def dependent_cls(cls):
     """
     Return dependent classes for the InstrumentCustodian object
     """
     ret = [InstrumentCustodian]
     ret += TestUsers.dependent_cls()
     ret += TestInstruments.dependent_cls()
     return ret
コード例 #6
0
 def dependent_cls(cls):
     """
     Return dependent classes for the ProposalInstrument object
     """
     ret = [ProposalInstrument]
     ret += TestProposals.dependent_cls()
     ret += TestInstruments.dependent_cls()
     return ret
コード例 #7
0
 def dependent_cls(cls):
     """
     Return dependent classes for the InstrumentGroup object
     """
     ret = [InstrumentGroup]
     ret += TestInstruments.dependent_cls()
     ret += TestGroups.dependent_cls()
     return ret
コード例 #8
0
 def dependent_cls(cls):
     """
     Return dependent classes for the Transactions object
     """
     ret = [Transactions]
     ret += TestUsers.dependent_cls()
     ret += TestInstruments.dependent_cls()
     ret += TestProposals.dependent_cls()
     return ret