]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: tests: create capture fixture for tests
authorAlfredo Deza <adeza@redhat.com>
Mon, 17 Jul 2017 19:41:07 +0000 (15:41 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 4 Aug 2017 14:25:58 +0000 (10:25 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/tests/conftest.py [new file with mode: 0644]

diff --git a/src/ceph-volume/ceph_volume/tests/conftest.py b/src/ceph-volume/ceph_volume/tests/conftest.py
new file mode 100644 (file)
index 0000000..869979e
--- /dev/null
@@ -0,0 +1,16 @@
+import pytest
+
+class Capture(object):
+
+    def __init__(self, *a, **kw):
+        self.a = a
+        self.kw = kw
+        self.calls = []
+
+    def __call__(self, *a, **kw):
+        self.calls.append({'args': a, 'kwargs': kw})
+
+
+@pytest.fixture
+def capture():
+    return Capture()