diff --git a/tests/core/fake_device_module.py b/tests/core/fake_device_module.py index cf4fa262a..3a8914d6b 100644 --- a/tests/core/fake_device_module.py +++ b/tests/core/fake_device_module.py @@ -2,10 +2,6 @@ from ophyd import EpicsMotor -FOO = NonCallableMock() -BAR = NonCallableMock() -BAR.__name__ = "BAR" - def fake_motor_bundle_b( fake_motor_x: EpicsMotor, @@ -33,3 +29,9 @@ def _mock_with_name(name: str) -> MagicMock: mock = MagicMock() mock.name = name return mock + + +FOO = NonCallableMock() +BAR = NonCallableMock() +BAR.__name__ = "BAR" +BAR.__module__ = fake_motor_bundle_a.__module__ diff --git a/tests/service/test_runner.py b/tests/service/test_runner.py index 28e8b8d39..7d39fb0d1 100644 --- a/tests/service/test_runner.py +++ b/tests/service/test_runner.py @@ -131,6 +131,6 @@ def test_clear_message_for_invalid_function(started_runner: WorkerDispatcher): with pytest.raises( RpcError, - match="BAR: No such function in subprocess API", + match="BAR: Object in subprocess is not a function", ): started_runner.run(BAR)