]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: add asyncmock to python venv
authorMichael Fritch <mfritch@suse.com>
Mon, 30 Aug 2021 22:49:24 +0000 (16:49 -0600)
committerAdam King <adking@redhat.com>
Tue, 31 Aug 2021 16:52:17 +0000 (12:52 -0400)
for running unittests on python <= 3.8

Signed-off-by: Michael Fritch <mfritch@suse.com>
src/pybind/mgr/cephadm/tests/test_cephadm.py
src/pybind/mgr/requirements.txt

index 93cf942085df66808f1d81e50b7ec1d526724d86..c2e845351487aa378562a378a11e8a33aa1cec17 100644 (file)
@@ -3,7 +3,10 @@ try:
     # AsyncMock was not added until python 3.8
     from unittest.mock import AsyncMock
 except ImportError:
-    pass
+    from asyncmock import AsyncMock
+except ImportError:
+    AsyncMock = None
+
 from contextlib import contextmanager
 
 import pytest
index ccc3b1f414f78903ec10f88349d896bcd3118cc6..27e791f6c931d3f86fb09ebf7e820157a20c5e22 100644 (file)
@@ -8,3 +8,4 @@ pyOpenSSL
 Jinja2
 pyfakefs
 asyncssh
+asyncmock