def test_add_office(self): office = Office('MyOffice78') initial_room_count = len(Dojo.rooms()) initial_office_count = len(Office.rooms()) Office.add(office) new_room_count = len(Dojo.rooms()) new_office_count = len(Office.rooms()) self.assertEqual([initial_room_count + 1, initial_office_count + 1], [new_room_count, new_office_count])
def test_remove_office(self): office = Office('MyOffice89') Office.add(office) initial_room_count = len(Dojo.rooms()) initial_office_count = len(Office.rooms()) Office.remove(office) new_room_count = len(Dojo.rooms()) new_office_count = len(Office.rooms()) self.assertEqual([initial_room_count - 1, initial_office_count - 1], [new_room_count, new_office_count])