diff --git a/tests/fixtures/device.py b/tests/fixtures/device.py index 83a1d75..c7f9ab8 100644 --- a/tests/fixtures/device.py +++ b/tests/fixtures/device.py @@ -14,7 +14,7 @@ def mock_device(request): device._info = deepcopy(request.cls.device_info) device._session = None device._zeroconf = None - yield device + return device @pytest.fixture() @@ -26,4 +26,4 @@ def mock_service_browser(mocker): @pytest.fixture() def mock_zeroconf(mocker): mocker.patch("zeroconf.Zeroconf.get_service_info", MockZeroconf.get_service_info) - yield Zeroconf() + return Zeroconf() diff --git a/tests/fixtures/protobuf.py b/tests/fixtures/protobuf.py index 7da8c6a..3b19622 100644 --- a/tests/fixtures/protobuf.py +++ b/tests/fixtures/protobuf.py @@ -10,8 +10,7 @@ @pytest.fixture() def mock_protobuf(): - protobuf = StubProtobuf() - yield protobuf + return StubProtobuf() @pytest.fixture()