Skip to content

Commit

Permalink
TST: Remove extra newlines in class instantiations
Browse files Browse the repository at this point in the history
  • Loading branch information
cortadocodes committed Jan 31, 2024
1 parent 1ce91a1 commit b0a4e38
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions tests/cloud/pub_sub/test_message_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,7 @@ def test_delivery_acknowledgement(self):
question_uuid, mock_topic, mock_subscription = create_mock_topic_and_subscription()

with patch("octue.cloud.pub_sub.message_handler.SubscriberClient", MockSubscriber):
message_handler = OrderedMessageHandler(
subscription=mock_subscription,
receiving_service=parent,
)
message_handler = OrderedMessageHandler(subscription=mock_subscription, receiving_service=parent)

child = MockService(backend=GCPPubSubBackend(project_name=TEST_PROJECT_NAME))

Expand Down Expand Up @@ -278,10 +275,7 @@ def test_error_raised_if_heartbeats_stop_being_received(self):
question_uuid, _, mock_subscription = create_mock_topic_and_subscription()

with patch("octue.cloud.pub_sub.message_handler.SubscriberClient", MockSubscriber):
message_handler = OrderedMessageHandler(
subscription=mock_subscription,
receiving_service=parent,
)
message_handler = OrderedMessageHandler(subscription=mock_subscription, receiving_service=parent)

message_handler._last_heartbeat = datetime.datetime.now() - datetime.timedelta(seconds=30)

Expand All @@ -295,10 +289,7 @@ def test_error_not_raised_if_heartbeat_has_been_received_in_maximum_allowed_inte
question_uuid, mock_topic, mock_subscription = create_mock_topic_and_subscription()

with patch("octue.cloud.pub_sub.message_handler.SubscriberClient", MockSubscriber):
message_handler = OrderedMessageHandler(
subscription=mock_subscription,
receiving_service=parent,
)
message_handler = OrderedMessageHandler(subscription=mock_subscription, receiving_service=parent)

message_handler._last_heartbeat = datetime.datetime.now()

Expand Down Expand Up @@ -332,10 +323,7 @@ def test_time_since_last_heartbeat_is_none_if_no_heartbeat_received_yet(self):
question_uuid, _, mock_subscription = create_mock_topic_and_subscription()

with patch("octue.cloud.pub_sub.message_handler.SubscriberClient", MockSubscriber):
message_handler = OrderedMessageHandler(
subscription=mock_subscription,
receiving_service=parent,
)
message_handler = OrderedMessageHandler(subscription=mock_subscription, receiving_service=parent)

self.assertIsNone(message_handler._time_since_last_heartbeat)

Expand Down

0 comments on commit b0a4e38

Please sign in to comment.