def test_remove_selection_provider(self): service = SelectionService() provider = BogusSelectionProvider(provider_id='Bogus') service.add_selection_provider(provider) service.remove_selection_provider(provider) self.assertFalse(service.has_selection_provider(provider.provider_id)) with self.assertRaises(ProviderNotRegisteredError): service.remove_selection_provider(provider)
def test_add_selection_provider(self): service = SelectionService() provider = BogusSelectionProvider() service.add_selection_provider(provider) self.assertTrue(service.has_selection_provider(provider.provider_id))