Ejemplo n.º 1
0
class TestLivingSpaces(unittest.TestCase):
    """Unitest for offices"""

    def setUp(self):
        self.room = LivingSpace
        self.crucible = LivingSpace('Crucible', 'ROOM', 'MALE')
        self.person = Person('stephen', 'sunday')
        self.people = self.crucible.list_people()

    def test_that_a_person_can_be_added_to_office(self):
        self.assertEqual(len(self.crucible.people), 0)
        self.crucible.add_person(self.person)
        self.assertIn(self.person, self.crucible.people)
        self.assertEqual(len(self.crucible.people), 1)

    def test_that_office_returns_person(self):
        self.assertTrue(self.person, self.people)
Ejemplo n.º 2
0
 def setUp(self):
     self.room = LivingSpace
     self.crucible = LivingSpace('Crucible', 'ROOM', 'MALE')
     self.person = Person('stephen', 'sunday')
     self.people = self.crucible.list_people()