File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 1- from unittest .mock import patch
1+ from unittest .mock import MagicMock , patch
2+
3+ from bluesky .protocols import Readable
4+ from ophyd import EpicsMotor
25
36from dodal .utils import collect_factories , get_hostname , make_all_devices
47
@@ -20,7 +23,20 @@ def test_makes_devices() -> None:
2023 assert {"readable" , "motor" , "cryo" } == devices .keys ()
2124
2225
26+ def test_makes_devices_with_module_name () -> None :
27+ devices = make_all_devices ("tests.fake_beamline" )
28+ assert {"readable" , "motor" , "cryo" } == devices .keys ()
29+
30+
2331def test_get_hostname () -> None :
2432 with patch ("dodal.utils.socket.gethostname" ) as mock :
2533 mock .return_value = "a.b.c"
2634 assert get_hostname () == "a"
35+
36+
37+ def device_a () -> Readable :
38+ return MagicMock ()
39+
40+
41+ def device_b () -> EpicsMotor :
42+ return MagicMock ()
You can’t perform that action at this time.
0 commit comments