Skip to content

Commit

Permalink
Remove unneeded side effect
Browse files Browse the repository at this point in the history
  • Loading branch information
ADOT Patch workflow committed Jan 30, 2024
1 parent b708bf5 commit f7bf671
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,13 @@ def test_get_ingress_operation_null_name_and_no_fallback(self):
invalid_name: str = None
self.span_data_mock.name = invalid_name
self.span_data_mock.kind = SpanKind.SERVER

def attributes_get_side_effect(key):
if key == SpanAttributes.HTTP_METHOD:
return invalid_name

self.attributes_mock.get.side_effect = attributes_get_side_effect
actual_operation: str = get_ingress_operation(self, self.span_data_mock)
self.assertEqual(actual_operation, _UNKNOWN_OPERATION)

def test_get_ingress_operation_unknown_name_and_no_fallback(self):
invalid_name: str = _UNKNOWN_OPERATION
self.span_data_mock.name = invalid_name
self.span_data_mock.kind = SpanKind.SERVER

def attributes_get_side_effect(key):
if key == SpanAttributes.HTTP_METHOD:
return invalid_name

self.attributes_mock.get.side_effect = attributes_get_side_effect
actual_operation: str = get_ingress_operation(self, self.span_data_mock)
self.assertEqual(actual_operation, _UNKNOWN_OPERATION)

Expand Down

0 comments on commit f7bf671

Please sign in to comment.