コード例 #1
0
 def base_create_dep_objs(cls):
     """
     Create all objects that ProposalParticipant need.
     """
     prop3 = Proposals()
     TestProposals.base_create_dep_objs()
     prop3.from_hash(SAMPLE_PROPOSAL_HASH)
     prop3.save(force_insert=True)
     user = Users()
     TestUsers.base_create_dep_objs()
     user.from_hash(SAMPLE_USER_HASH)
     user.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 FileKeyValue need.
     """
     prop1 = Proposals()
     TestProposals.base_create_dep_objs()
     prop1.from_hash(SAMPLE_PROPOSAL_HASH)
     prop1.save(force_insert=True)
     cite = Citations()
     TestCitations.base_create_dep_objs()
     cite.from_hash(SAMPLE_CITATION_HASH)
     cite.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 ProposalParticipant object
     """
     ret = [ProposalParticipant]
     ret += TestProposals.dependent_cls()
     ret += TestUsers.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 CitationProposal object
     """
     ret = [CitationProposal]
     ret += TestCitations.dependent_cls()
     ret += TestProposals.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