]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/cephadm/tests/conftest.py
import ceph quincy 17.2.6
[ceph.git] / ceph / src / pybind / mgr / cephadm / tests / conftest.py
1 import pytest
2
3 from cephadm.services.osd import RemoveUtil, OSD
4 from tests import mock
5
6 from .fixtures import with_cephadm_module
7
8
9 @pytest.fixture()
10 def cephadm_module():
11 with with_cephadm_module({}) as m:
12 yield m
13
14
15 @pytest.fixture()
16 def rm_util():
17 with with_cephadm_module({}) as m:
18 r = RemoveUtil.__new__(RemoveUtil)
19 r.__init__(m)
20 yield r
21
22
23 @pytest.fixture()
24 def osd_obj():
25 with mock.patch("cephadm.services.osd.RemoveUtil"):
26 o = OSD(0, mock.MagicMock())
27 yield o