Exemple #1
0
    def setUp(self):
        model.Person.number_of_person = 0
        self.dojo = model.Dojo("Andela_kenya")
        # allocated persons
        self.person1 = model.Staff("person1")
        self.person4 = model.Fellow("person4")
        # unallocated persons
        self.person2 = model.Staff("person2")
        self.person3 = model.Fellow("person3")

        self.room1 = model.Office("room1")
        self.room2 = model.LivingSpace("room2")

        self.room3 = model.Office("room3")
        self.room4 = model.LivingSpace("room4")

        # assing offices
        self.room1.add_occupant(self.person1)
        self.room1.add_occupant(self.person4)
        # assign livingspace
        self.room2.add_occupant(self.person4)

        self.person1.office = True
        self.person4.office = True
        self.person4.livingspace = True

        self.dojo.add_office(self.room1)
        self.dojo.add_livingspace(self.room2)
        self.dojo.add_office(self.room3)
        self.dojo.add_livingspace(self.room4)

        self.dojo.add_staff(self.person1)
        self.dojo.add_staff(self.person2)
        self.dojo.add_fellow(self.person3)
        self.dojo.add_fellow(self.person4)
    def setUp(self):
        self.room1 = model.Office("room1")
        self.room2 = model.LivingSpace("room2")
        self.room3 = model.Office("notindojo")
        self.room4 = model.LivingSpace("notindojo")
        self.room5 = model.Office("emptyroom")

        self.person1 = model.Staff("person1")
        self.person2 = model.Staff("person2")

        # update rooms with staffself.dojo,
        self.room1.add_occupant(self.person1)
        self.room1.add_occupant(self.person2)

        self.person3 = model.Fellow("person3")
        self.person4 = model.Fellow("person4")

        # update room with fellows
        self.room1.add_occupant(self.person3)
        self.room2.add_occupant(self.person4)

        self.dojo = model.Dojo("Andela_kenya")
        self.dojo.add_staff(self.person1)
        self.dojo.add_staff(self.person2)
        self.dojo.add_fellow(self.person3)
        self.dojo.add_fellow(self.person4)

        self.dojo.add_office(self.room1)
        self.dojo.add_office(self.room5)
        self.dojo.add_livingspace(self.room2)
    def setUp(self):
        self.dojo = model.Dojo("Andela-kenya")

        self.office = model.Office("Tsavo")
        self.livingspace = model.LivingSpace("hostel")

        self.staff1 = model.Staff("staff1")
        self.fellow1 = model.Fellow("fellow1")

        self.dojo.add_office(self.office)
        self.dojo.add_livingspace(self.livingspace)
    def setUp(self):
        self.dojo = model.Dojo("Andela_kenya")

        # unallocated staff
        self.staff1 = model.Staff("staff1")
        self.staff2 = model.Staff("staff2")

        # unallocated fellow
        self.fellow1 = model.Fellow("fellow1")
        self.fellow2 = model.Fellow("fellow2")

        self.office1 = model.Office("office1")
        self.livingspace1 = model.LivingSpace("livingspace1")

        # update dojo with infomation
        self.dojo.add_office(self.office1)
        self.dojo.add_livingspace(self.livingspace1)
        self.dojo.add_fellow(self.fellow1)
        self.dojo.add_fellow(self.fellow2)
        self.dojo.add_staff(self.staff1)
        self.dojo.add_staff(self.staff2)
    def setUp(self):
        self.dojo1 = model.Dojo("Andela_kenya")

        self.room = model.Office("HR")
        self.room2 = model.Office("IT")

        self.room3 = model.LivingSpace("Complex_A")
        self.room4 = model.LivingSpace("Complex_B")

        self.person1 = model.Fellow("Morris")
        self.person2 = model.Fellow("new_Fellow", True)

        self.person3 = model.Staff("Ndiga")
        self.person4 = model.Staff("Someone")

        # update dojo with info
        self.dojo1.add_office(self.room)
        self.dojo1.add_office(self.room2)
        self.dojo1.add_livingspace(self.room3)
        self.dojo1.add_livingspace(self.room4)
        self.dojo1.add_staff(self.person3)
        self.dojo1.add_staff(self.person4)
 def test_name_len_positive(self):
     self.assertIsInstance(model.Dojo("my_cool_name"), model.Dojo)
Exemple #7
0
 def setUp(self):
     self.dojo = model.Dojo("Andela-kenya")
 def setUp(self):
     self.dojo = model.Dojo("Andela-Kenya")
     self.white_char_in_name = logic.create_room('office', "name ",
                                                 self.dojo)
     self.white_char_in_typr = logic.create_room('livingspace ', "name",
                                                 self.dojo)