def test_register_wrong_handler(self): """ register wrong handler """ registry = Registry() with self.assertRaises(TypeError): registry.register('tests.test_registry.WrongSMSHandler')
def setUp(self): self.attrs = { 'auth_credentials': { 'username': '******', 'api-key': 'api-key', } } registry = Registry() registry.register('sms.handlers.SMSC') with closing(open('tests/responses/success.json', 'r')) as json_file: self.post_success = json_file.read()
def ready(self): """ on app ready """ registry = Registry() registry.register('apps.sms.handlers.MyProvider')