Skip to content

Commit f16e7aa

Browse files
committed
Also backport the integration test for Model.name into 2.9
1 parent f15943f commit f16e7aa

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/integration/test_model.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@
2121
from ..utils import MB, GB, TESTS_DIR, OVERLAYS_DIR, SSH_KEY, INTEGRATION_TEST_DIR
2222

2323

24+
@base.bootstrapped
25+
@pytest.mark.asyncio
26+
async def test_model_name(event_loop):
27+
model = Model()
28+
with pytest.raises(JujuError):
29+
model.name
30+
31+
async with base.CleanModel() as new_model:
32+
await model.connect(new_model.name)
33+
assert model.name == new_model.name
34+
await model.disconnect()
35+
36+
2437
@base.bootstrapped
2538
@pytest.mark.asyncio
2639
async def test_deploy_local_bundle_dir(event_loop):

0 commit comments

Comments
 (0)