Skip to content

Commit

Permalink
Refactor geoip enricher test
Browse files Browse the repository at this point in the history
  • Loading branch information
ppcad committed Dec 17, 2024
1 parent 91082e7 commit 8a9bab0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/processor/geoip_enricher/test_geoip_enricher.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ def test_source_field_is_none_emits_missing_fields_warning(self):
expected = {"client": {"ip": None}, "tags": ["_geoip_enricher_missing_field_warning"]}
self._load_rule(self.object.rules[0])
self.object.process(document)
assert document == expected
assert len(self.object.result.warnings) == 1
assert re.match(
r".*missing source_fields: \['client\.ip'].*", str(self.object.result.warnings[0])
)
assert document == expected

def test_nothing_to_enrich(self):
document = {"something": {"something": "1.2.3.4"}}
Expand Down

0 comments on commit 8a9bab0

Please sign in to comment.