Ejemplo n.º 1
0
    def setUp(self):
        self.pin1 = Machine.objects.create(name="Pinnacle 1")
        self.pin2 = Machine.objects.create(name="Pinnacle 2")
        self.starvision = Machine.objects.create(name="Starvision")

        self.c1 = Customer.objects.create(name="Custy 1")
        self.c2 = Customer.objects.create(name="ABC Co.")

        create_jobs(3, self.pin1, [self.c1, self.c2])
        create_jobs(3, self.pin2, [self.c1, self.c2])
        create_jobs(3, self.starvision, [self.c1, self.c2])
Ejemplo n.º 2
0
    def setUp(self):
        self.u1 = User.objects.create_user(username='******',
                                           password="******").save()

        self.pin1 = Machine.objects.create(name="Pinnacle 1")
        self.pin2 = Machine.objects.create(name="Pinnacle 2")
        self.starvision = Machine.objects.create(name="Starvision")

        self.c1 = Customer.objects.create(name="Custy 1")
        self.c2 = Customer.objects.create(name="ABC Co.")

        create_jobs(3, self.pin1, [self.c1, self.c2])
        create_jobs(3, self.pin2, [self.c1, self.c2])
        create_jobs(3, self.starvision, [self.c1, self.c2])
Ejemplo n.º 3
0
    def setUp(self):
        self.u1 = User.objects.create_user(username='******',
                                           password="******")

        self.pin1 = Machine.objects.create(name="Pinnacle 1")
        self.pin2 = Machine.objects.create(name="Pinnacle 2")
        self.starvision = Machine.objects.create(name="Starvision")

        self.p1 = Profile.objects.get(user=self.u1)
        self.p1.machines.set([self.pin1, self.pin2])
        self.p1.save()

        self.c1 = Customer.objects.create(name="Custy 1")
        self.c2 = Customer.objects.create(name="ABC Co.")

        # create referenced jobs for useing in testing
        create_jobs(3, self.pin1, [self.c1, self.c2])
        create_jobs(3, self.pin2, [self.c1, self.c2])
        create_jobs(3, self.starvision, [self.c1, self.c2])
Ejemplo n.º 4
0
    def setUp(self):
        self.u1 = User.objects.create_user(username='******',
                                           password="******")

        self.pin1 = Machine.objects.create(name="Pinnacle 1")
        self.pin2 = Machine.objects.create(name="Pinnacle 2")
        self.starvision = Machine.objects.create(name="Starvision")

        self.c1 = Customer.objects.create(name="Custy 1")
        self.c2 = Customer.objects.create(name="ABC Co.")

        create_jobs(5, self.pin1, [self.c1, self.c2])
        create_jobs(5, self.pin2, [self.c1, self.c2])
        create_jobs(5, self.starvision, [self.c1, self.c2])

        jobs = Job.objects.all()
        for job in jobs:
            job.active = False
            job.save()

        profile = Profile.objects.get(user=self.u1)
        profile.machines.set([self.pin1, self.pin2, self.starvision])
        profile.save()