diff --git a/tests/conftest.py b/tests/conftest.py index 0d82c97..e8180f6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -20,7 +20,6 @@ import json import logging import os -import sys import elasticapm import pytest @@ -75,7 +74,7 @@ def validator(data_json): ) ) if v.get("index") and list(data.keys())[v.get("index")] != k: - raise ValidationError(f"Key {k} is not at index {index}") + raise ValidationError(f"Key {k} is not at index {v.get('index')}") return data_json diff --git a/tests/test_stdlib_formatter.py b/tests/test_stdlib_formatter.py index 18cf555..62bc41b 100644 --- a/tests/test_stdlib_formatter.py +++ b/tests/test_stdlib_formatter.py @@ -22,7 +22,6 @@ import json import time import random -import sys import ecs_logging from io import StringIO