예제 #1
0
 def base_create_dep_objs(cls):
     """
     Create all objects that Files depend on.
     """
     user = Users()
     TestUsers.base_create_dep_objs()
     user.from_hash(SAMPLE_USER_HASH)
     user.save(force_insert=True)
     inst = Institutions()
     TestInstitutions.base_create_dep_objs()
     inst.from_hash(SAMPLE_INSTITUTION_HASH)
     inst.save(force_insert=True)
 def base_create_dep_objs(cls):
     """
     Create all objects that InstitutionPerson need.
     """
     inst = Institutions()
     TestInstitutions.base_create_dep_objs()
     inst.from_hash(SAMPLE_INSTITUTION_HASH)
     inst.save(force_insert=True)
     user1 = Users()
     TestUsers.base_create_dep_objs()
     user1.from_hash(SAMPLE_USER_HASH)
     user1.save(force_insert=True)
예제 #3
0
 def dependent_cls(cls):
     """
     Return dependent classes for the Contributors object
     """
     ret = [Contributors]
     ret += TestInstitutions.dependent_cls()
     ret += TestUsers.dependent_cls()
     return ret
 def dependent_cls(cls):
     """
     Return dependent classes for the InstitutionPerson object
     """
     ret = [InstitutionPerson]
     ret += TestUsers.dependent_cls()
     ret += TestInstitutions.dependent_cls()
     return ret