def test_that_does_not_delete_pms_which_are_not_sans(self): property_manager = self._get_property_manager() PropertyManagerDataService.addOrReplace("test", property_manager) pms = PropertyManagerService() pms.remove_sans_property_managers() self.assertEqual(len(PropertyManagerDataService.getObjectNames()), 1) self._remove_all_property_managers()
def test_that_does_not_delete_pms_which_are_not_sans(self): property_manager = self._get_property_manager() PropertyManagerDataService.addOrReplace("test", property_manager) pms = PropertyManagerService() pms.remove_sans_property_managers() self.assertTrue(len(PropertyManagerDataService.getObjectNames()) == 1) self._remove_all_property_managers()
def test_that_removes_sans_property_managers_from_pmds(self): self.assertEqual(len(PropertyManagerDataService.getObjectNames()), 0) states = {0: get_example_state(), 1: get_example_state()} pms = PropertyManagerService() pms.add_states_to_pmds(states) pms.remove_sans_property_managers() self.assertEqual(len(PropertyManagerDataService.getObjectNames()), 0) self._remove_all_property_managers()
def test_that_removes_sans_property_managers_from_pmds(self): self.assertTrue(len(PropertyManagerDataService.getObjectNames()) == 0) states = {0: get_example_state(), 1: get_example_state()} pms = PropertyManagerService() pms.add_states_to_pmds(states) pms.remove_sans_property_managers() self.assertTrue(len(PropertyManagerDataService.getObjectNames()) == 0) self._remove_all_property_managers()