Feature/api version support (#109)
[osm/N2VC.git] / tests / integration / test_errors.py
index d173bce..06b3826 100644 (file)
@@ -40,8 +40,7 @@ async def test_juju_error_in_results_list(event_loop):
     from juju.client import client
 
     async with base.CleanModel() as model:
-        ann_facade = client.AnnotationsFacade()
-        ann_facade.connect(model.connection)
+        ann_facade = client.AnnotationsFacade.from_connection(model.connection)
 
         ann = client.EntityAnnotations(
             entity='badtag',
@@ -63,8 +62,7 @@ async def test_juju_error_in_result(event_loop):
     from juju.client import client
 
     async with base.CleanModel() as model:
-        app_facade = client.ApplicationFacade()
-        app_facade.connect(model.connection)
+        app_facade = client.ApplicationFacade.from_connection(model.connection)
 
         with pytest.raises(JujuError):
             return await app_facade.GetCharmURL('foo')