import asyncio
-import pytest
-
from tempfile import NamedTemporaryFile
+import pytest
+
from .. import base
await asyncio.wait_for(
model.block_until(lambda: (machine.status == 'running' and
- machine.agent_status == 'started')),
+ machine.agent_status == 'started' and
+ machine.agent_version is not None)),
timeout=480)
assert machine.status == 'running'
@base.bootstrapped
@pytest.mark.asyncio
async def test_scp(event_loop):
+ # ensure that asyncio.subprocess will work;
+ try:
+ asyncio.get_child_watcher().attach_loop(event_loop)
+ except RuntimeError:
+ pytest.skip('test_scp will always fail outside of MainThread')
async with base.CleanModel() as model:
await model.add_machine()
await asyncio.wait_for(