Exemplo n.º 1
0
    def setUp(self):
        #initial information into temperory database
        self.user = User()
        self.user.username = "******"
        self.user.password = "******"
        self.user.email = "asfja"
        self.user.is_confirmed = True
        self.user.save()

        self.project1 = project()
        self.project1.project_name = "project1"
        self.project1.creator = self.user
        self.project1.save()
        self.project2 = project()
        self.project2.project_name = "project2"
        self.project2.creator = self.user
        self.project2.save()
Exemplo n.º 2
0
def newProject(name, user, track):
    try:
        projectObj = project(project_name=name, creator=user, track_id=track)
        projectObj.save()
        userPjctObj = user_project(user=user, project=projectObj)
        userPjctObj.save()
        return True, projectObj
    except:
        return False, null
Exemplo n.º 3
0
    def setUp(self):
        #initail information into temperory database
        self.user = User()
        self.user.username = "******"
        self.user.password = "******"
        self.user.email = "email"
        self.user.is_confirmed = True
        self.user.save()

        self.project = project()
        self.project.id = 1
        self.project.project_name = "project"
        self.project.creator = self.user
        self.project.save()
        
        self.client = Client()
Exemplo n.º 4
0
    def setUp(self):
        #initial information into temperory database
        self.user = User()
        self.user.username = "******"
        self.user.password = "******"
        self.user.email = "email"
        self.user.is_confirmed = True
        self.user.save()

        self.project = project()
        self.project.project_name = "project"
        self.project.creator = self.user
        self.project.save()
        
        self.chain1 = chain()
        self.chain1.name = "chain1"
        self.chain1.id = 1
        self.chain1.sequence = "1_2_3"
        self.chain1.project = self.project
        self.chain1.save()
        self.chain2 = chain()
        self.chain2.id = 2
        self.chain2.name = "chain2"
        self.chain2.sequence = ""
        self.chain2.project = self.project
        self.chain2.save()

        self.partObj1 = parts()
        self.partObj1.part_id = 1
        self.partObj1.part_name = "part1"
        self.partObj1.part_type = "type1"
        self.partObj1.save()
        self.partObj2 = parts()
        self.partObj2.part_id = 2
        self.partObj2.part_name = "part2"
        self.partObj2.part_type = "type2"
        self.partObj2.save()
        self.partObj3 = parts()
        self.partObj3.part_id = 3
        self.partObj3.part_name = "part3"
        self.partObj3.part_type = "type3"
        self.partObj3.save()
Exemplo n.º 5
0
    def setUp(self):
        self.client = Client()
        #initial information into temperory database
        self.user = User()
        self.user.username = "******"
        self.user.password = "******"
        self.user.email = "email"
        self.user.is_confirmed = True
        self.user.save()

        self.project = project()
        self.project.project_name = "project"
        self.project.creator = self.user
        self.project.save()
        
        self.chain1 = chain()
        self.chain1.name = "chain1"
        self.chain1.id = 1
        self.chain1.sequence = "1_2_3_4_5"
        self.chain1.project = self.project
        self.chain1.save()
        self.chain2 = chain()
        self.chain2.name = "chain2"
        self.chain2.id = 2
        self.chain2.sequence = ""
        self.chain2.project = self.project
        self.chain2.save()
        self.chain3 = chain()
        self.chain3.name = "chain3"
        self.chain3.id = 3
        self.chain3.sequence = "1"
        self.chain3.project = self.project
        self.chain3.save()
        self.chain4 = chain()
        self.chain4.name = "chain4"
        self.chain4.id = 4
        self.chain4.sequence = "1__5"
        self.chain4.project = self.project
        self.chain4.save()
Exemplo n.º 6
0
    def setUp(self):
        #initial information into temperory database
        self.user = User()
        self.user.username = "******"
        self.user.password = "******"
        self.user.email = "email"
        self.user.is_confirmed = True
        self.user.save()

        self.project = project()
        self.project.project_name = "project"
        self.project.creator = self.user
        self.project.save()
        
        self.chain1 = chain()
        self.chain1.name = "chain1"
        self.chain1.project = self.project
        self.chain1.save()
        self.chain2 = chain()
        self.chain2.name = "chain2"
        self.chain2.project = self.project
        self.chain2.save()