コード例 #1
0
 def test_register_wrong_handler(self):
     """
     register wrong handler
     """
     registry = Registry()
     with self.assertRaises(TypeError):
         registry.register('tests.test_registry.WrongSMSHandler')
コード例 #2
0
 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()
コード例 #3
0
 def ready(self):
     """
     on app ready
     """
     registry = Registry()
     registry.register('apps.sms.handlers.MyProvider')