New N2VC interface + updated libjuju
[osm/N2VC.git] / tests / test_async_task.py
diff --git a/tests/test_async_task.py b/tests/test_async_task.py
new file mode 100644 (file)
index 0000000..da6e96e
--- /dev/null
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3
+# Recreate the conditions in which this will be used in OSM, called via tasks
+import asyncio
+
+if __name__ == "__main__":
+    main()
+
+async def do_something():
+    pass
+
+def main():
+
+    loop = asyncio.get_event_loop()
+    loop.run_until_complete(do_something())
+    loop.close()
+    loop = None