def test_given_unexpected_class_throws_value_error(self): """ Test that instantiating ConfigurationService raises exception on passing a class which is not subclass of ConfigurationModel. """ with self.assertRaises(ValueError): ConfigurationService(DummyUnexpected)
def test_configuration_service(self): """ Test the correct configuration on instantiating ConfigurationService. """ config_service = ConfigurationService(DummyConfig) self.assertEqual(config_service.configuration, DummyConfig)