def test_remove_existing_room(self): room = LivingSpace("xd") Dojo.add_room(room) initial_room_count = Dojo.room_count() initial_found_state = Dojo.has_room(room) Dojo.remove_room(room) new_room_count = Dojo.room_count() new_found_state = Dojo.has_room(room) self.assertEqual([new_room_count, new_found_state], [initial_room_count - 1, not initial_found_state])
def remove(cls, office): cls.filter_office(office) Dojo.remove_room(office) del cls.__offices[office.name] cls.__offices_set.remove("%s-%s" % (office.name, office.type_))
def remove(cls, livingspace): cls.filter_livingspace(livingspace) Dojo.remove_room(livingspace) del cls.__livingspaces[livingspace.name] cls.__livingspaces_set.remove("%s-%s" % (livingspace.name, livingspace.type_))