1313import pylxd
1414import pytest
1515from juju import jasyncio
16- from juju .client . client import ApplicationFacade , ConfigValue
16+ from juju .client import client
1717from juju .errors import JujuError , JujuUnitError , JujuConnectionError
1818from juju .model import Model , ModelObserver
1919from juju .utils import block_until , run_with_interrupt , wait_for_bundle
@@ -555,7 +555,7 @@ async def on_relation_add(self, delta, old, new, model):
555555
556556 model .add_observer (TestObserver ())
557557
558- real_app_facade = ApplicationFacade .from_connection (model .connection ())
558+ real_app_facade = client . ApplicationFacade .from_connection (model .connection ())
559559 mock_app_facade = mock .MagicMock ()
560560
561561 async def mock_AddRelation (* args , ** kwargs ):
@@ -567,7 +567,7 @@ async def mock_AddRelation(*args, **kwargs):
567567
568568 mock_app_facade .AddRelation = mock_AddRelation
569569
570- with mock .patch .object (ApplicationFacade , 'from_connection' ,
570+ with mock .patch .object (client . ApplicationFacade , 'from_connection' ,
571571 return_value = mock_app_facade ):
572572 my_relation = await run_with_interrupt (model .relate (
573573 'ubuntu' ,
@@ -846,7 +846,7 @@ async def test_config(event_loop):
846846 assert 'extra-info' not in result
847847 await model .set_config ({
848848 'extra-info' : 'booyah' ,
849- 'test-mode' : ConfigValue (value = True ),
849+ 'test-mode' : client . ConfigValue (value = True ),
850850 })
851851 result = await model .get_config ()
852852 assert 'extra-info' in result
@@ -865,7 +865,7 @@ async def test_config_with_json(event_loop):
865865 expected = ['foo' , {'bar' : 1 }]
866866 await model .set_config ({
867867 'extra-complex-info' : json .dumps (expected ),
868- 'test-mode' : ConfigValue (value = True ),
868+ 'test-mode' : client . ConfigValue (value = True ),
869869 })
870870 result = await model .get_config ()
871871 assert 'extra-complex-info' in result
0 commit comments