Skip to content

Commit 956a377

Browse files
committed
Fix unit tests
1 parent e4a72ba commit 956a377

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

juju/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2749,7 +2749,7 @@ def _raise_for_status(entities, status):
27492749
if not busy:
27502750
break
27512751
busy = "\n ".join(busy)
2752-
if timeout and datetime.now() - start_time > timeout:
2752+
if timeout is not None and datetime.now() - start_time > timeout:
27532753
raise jasyncio.TimeoutError("Timed out waiting for model:\n" + busy)
27542754
if last_log_time is None or datetime.now() - last_log_time > log_interval:
27552755
log.info("Waiting for model:\n " + busy)

tests/unit/test_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ async def test_wait_for_active_units_waiting_for_units(self):
397397
mock_apps.return_value = apps
398398
m = Model()
399399

400-
await m.wait_for_idle(apps=["dummy_app"], status="active", wait_for_units=1,
400+
await m.wait_for_idle(apps=["dummy_app"], status="active", wait_for_at_least_units=1,
401401
timeout=None)
402402

403403
mock_apps.assert_called_with()

0 commit comments

Comments
 (0)