Skip to content
Snippets Groups Projects
Commit 94c3dd5c authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-2073: Compatibility fixes for lofar-station-client

parent 6b0893f0
No related branches found
Tags v0.0.23
1 merge request!19L2SS-2073: Compatibility fixes for lofar-station-client
......@@ -29,17 +29,6 @@ class ZeroMQReceiver(ZeroMQSubscriber):
self.num_bytes_read = 0
def open(self):
"""Open I/O resources"""
def __enter__(self):
self.open()
return self
def __exit__(self, type_, value, exc):
self.close()
return False
def __iter__(self):
"""Iterates over all packets in the stream."""
return self
......
......@@ -21,8 +21,8 @@ class TestZeroMQReceiver(TestCase):
ctx.return_value = mock.Mock()
ctx.return_value.socket.return_value = socket_mock
socket_mock.recv_multipart.side_effect = [
["test".encode(), "2024-05-17T08:35:48Z".encode(), "data1".encode()],
["test".encode(), "2024-05-17T08:36:48Z".encode(), "data2".encode()],
["test".encode(), "2024-05-17T08:35:48".encode(), "data1".encode()],
["test".encode(), "2024-05-17T08:36:48".encode(), "data2".encode()],
zmq.ZMQError(errno=zmq.ETERM),
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment