From 0c033415368beec383f9629cc23ac645ed3da889 Mon Sep 17 00:00:00 2001 From: ekneg54 Date: Mon, 16 Oct 2023 14:22:53 +0000 Subject: [PATCH] WIP --- .../unit/processor/geoip_enricher/test_geoip_enricher.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/unit/processor/geoip_enricher/test_geoip_enricher.py b/tests/unit/processor/geoip_enricher/test_geoip_enricher.py index e4585629f..c306ce020 100644 --- a/tests/unit/processor/geoip_enricher/test_geoip_enricher.py +++ b/tests/unit/processor/geoip_enricher/test_geoip_enricher.py @@ -103,7 +103,6 @@ def specific_rules_dirs(self): return self.CONFIG["specific_rules"] def test_geoip_data_added(self): - assert self.object.metrics.number_of_processed_events == 0 document = {"client": {"ip": "1.2.3.4"}} self.object.process(document) @@ -111,7 +110,6 @@ def test_geoip_data_added(self): assert document.get("geoip") def test_geoip_data_added_not_exists(self): - assert self.object.metrics.number_of_processed_events == 0 document = {"client": {"ip": "127.0.0.1"}} self.object.process(document) @@ -119,7 +117,6 @@ def test_geoip_data_added_not_exists(self): assert document.get("geoip") is None def test_no_geoip_data_added_if_source_field_is_none(self): - assert self.object.metrics.number_of_processed_events == 0 document = {"client": {"ip": None}} self.object.process(document) @@ -127,7 +124,6 @@ def test_no_geoip_data_added_if_source_field_is_none(self): assert document.get("geoip") is None def test_source_field_is_none_raises_processing_warning(self): - assert self.object.metrics.number_of_processed_events == 0 document = {"client": {"ip": None}} with pytest.raises( @@ -137,14 +133,12 @@ def test_source_field_is_none_raises_processing_warning(self): self.object._apply_rules(document, self.object.rules[0]) def test_nothing_to_enrich(self): - assert self.object.metrics.number_of_processed_events == 0 document = {"something": {"something": "1.2.3.4"}} self.object.process(document) assert "geoip" not in document def test_geoip_data_added_not_valid(self): - assert self.object.metrics.number_of_processed_events == 0 document = {"client": {"ip": "333.333.333.333"}} self.object.process(document) @@ -152,7 +146,6 @@ def test_geoip_data_added_not_valid(self): assert document.get("geoip") is None def test_enrich_an_event_geoip(self): - assert self.object.metrics.number_of_processed_events == 0 document = {"client": {"ip": "8.8.8.8"}} self.object.process(document) @@ -171,7 +164,6 @@ def test_enrich_an_event_geoip(self): assert geoip["properties"].get("accuracy_radius") == 1337 def test_enrich_an_event_geoip_with_existing_differing_geoip(self, caplog): - assert self.object.metrics.number_of_processed_events == 0 document = {"client": {"ip": "8.8.8.8"}, "geoip": {"type": "Feature"}} with caplog.at_level(logging.WARNING): @@ -179,7 +171,6 @@ def test_enrich_an_event_geoip_with_existing_differing_geoip(self, caplog): assert re.match(".*FieldExistsWarning.*geoip.type", caplog.text) def test_configured_dotted_output_field(self): - assert self.object.metrics.number_of_processed_events == 0 document = {"source": {"ip": "8.8.8.8"}} self.object.process(document)