Skip to content

Commit 4f99666

Browse files
committed
Don't bother iwth the connect
1 parent 4d8d0d7 commit 4f99666

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tests/server/test_ispyb.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,6 @@ def test_get_all_ongoing_visits():
7171
pass
7272

7373

74-
@mock.patch("workflows.transport.pika_transport.PikaTransport")
75-
def test_transport_manager_init(mock_transport):
76-
transport_manager = TransportManager("PikaTransport")
77-
print(mock_transport.mock_calls, transport_manager.transport)
78-
mock_transport().connect.assert_called_once()
79-
80-
8174
@mock.patch("workflows.transport.pika_transport.PikaTransport")
8275
def test_update_data_collection_group(mock_transport, ispyb_db_session: Session):
8376
# Manually get the BLSession ID for comparison
@@ -106,7 +99,7 @@ def test_update_data_collection_group(mock_transport, ispyb_db_session: Session)
10699
)
107100

108101
transport_manager = TransportManager("PikaTransport")
109-
with mock.patch("murfey.server.ispyb.ISPyBSession", ispyb_db_session):
102+
with mock.patch("murfey.server.ispyb.ISPyBSession.__call__", ispyb_db_session):
110103
transport_manager.do_update_data_collection_group(
111104
record=DataCollectionGroup(dataCollectionGroupId=1, experimentTypeId=2)
112105
)

0 commit comments

Comments
 (0)