From e04b56e0059ebfa2f5e319afbbee924dc6fab19c Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Fri, 9 Aug 2024 16:51:03 -0400 Subject: [PATCH] bug-1906108: switch to markus AnyTagValue --- tests/test_breakpad_resource.py | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/tests/test_breakpad_resource.py b/tests/test_breakpad_resource.py index 77c54ee5..3cab1838 100644 --- a/tests/test_breakpad_resource.py +++ b/tests/test_breakpad_resource.py @@ -8,6 +8,7 @@ from unittest.mock import ANY from everett.manager import ConfigManager +from markus.testing import AnyTagValue import pytest from antenna.breakpad_resource import ( @@ -19,34 +20,6 @@ from testlib.mini_poster import compress, multipart_encode -class AnyTagValue: - """Matches a markus metrics tag with any value""" - - def __init__(self, key): - self.key = key - - def __repr__(self): - return f"" - - def get_other_key(self, other): - # This is comparing against a tag string - if ":" in other: - other_key, _ = other.split(":") - else: - other_key = other - return other_key - - def __eq__(self, other): - if isinstance(other, AnyTagValue): - return self.key == other.key - return self.key == self.get_other_key(other) - - def __lt__(self, other): - if isinstance(other, AnyTagValue): - return self.key < other.key - return self.key < self.get_other_key(other) - - class FakeCrashMover: """Fake crash mover that raises an error when used"""