X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=tests%2Fintegration%2Ftest_errors.py;h=06b38260e69ae21022c3dd8f9fa2a6a81e7b6258;hb=49fe19ff5754ae8ce9365cd7bddbcd33f565bd69;hp=4a95a271b66b4126407e01fd7c633f93678da2ec;hpb=01ab1abd39c3a8dda2dc99745e782e840c7f5b10;p=osm%2FN2VC.git diff --git a/tests/integration/test_errors.py b/tests/integration/test_errors.py index 4a95a27..06b3826 100644 --- a/tests/integration/test_errors.py +++ b/tests/integration/test_errors.py @@ -40,9 +40,7 @@ async def test_juju_error_in_results_list(event_loop): from juju.client import client async with base.CleanModel() as model: - # Replicate - ann_facade = client.AnnotationsFacade() - ann_facade.connect(model.connection) + ann_facade = client.AnnotationsFacade.from_connection(model.connection) ann = client.EntityAnnotations( entity='badtag', @@ -59,7 +57,12 @@ async def test_juju_error_in_result(event_loop): Verify that we raise a JujuError when appropraite when we are looking at a single result coming back. - # TODO: write this! - ''' - pass + from juju.errors import JujuError + from juju.client import client + + async with base.CleanModel() as model: + app_facade = client.ApplicationFacade.from_connection(model.connection) + + with pytest.raises(JujuError): + return await app_facade.GetCharmURL('foo')