Exemplo n.º 1
0
def fake_backend_init(obj, *args, **kwargs):
    """Don't error on non-unique code_path field"""

    from armstrong.apps.embeds.backends import get_backend
    super(Backend, obj).__init__(*args, **kwargs)

    # patching this part
    obj._backend = get_backend(
        'armstrong.apps.embeds.backends.default.DefaultBackend')
    obj._setup_backend_proxy_methods()
Exemplo n.º 2
0
 def test_load_missing_backend_raises_error(self):
     with self.assertRaises(ImportError):
         get_backend('fake')
Exemplo n.º 3
0
 def test_load_no_backend_raises_error(self):
     with self.assertRaises(ImportError):
         get_backend('')