Skip to content

Commit 386a2cb

Browse files
committed
Update test utils
1 parent 6c0b02d commit 386a2cb

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

mixpanel/flags/test_utils.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,4 @@ def test_traceparent_format_is_correct(self):
2020
])
2121
def test_normalized_hash_for_known_inputs(self, key, salt, expected_hash):
2222
result = normalized_hash(key, salt)
23-
assert result == expected_hash, f"Expected hash of {expected_hash} for '{key}' with salt '{salt}', got {result}"
24-
25-
def test_normalized_hash_is_between_0_and_1(self):
26-
for _ in range(100):
27-
length = random.randint(5, 20)
28-
random_string = ''.join(random.choices(string.ascii_letters + string.digits, k=length))
29-
random_salt = ''.join(random.choices(string.ascii_letters, k=10))
30-
result = normalized_hash(random_string, random_salt)
31-
assert 0.0 <= result < 1.0, f"Hash value {result} is not in range [0, 1] for input '{random_string}'"
23+
assert result == expected_hash, f"Expected hash of {expected_hash} for '{key}' with salt '{salt}', got {result}"

0 commit comments

Comments
 (0)