Skip to content

Commit

Permalink
test: no bytes in HTTP headers (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
coryan authored Oct 5, 2023
1 parent be9912b commit cc471a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_csek.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def test_check_invalid_hash(self):
def test_validation_success(self):
key = b"1234567890" + b"1234567890" + b"1234567890" + b"AA"
key_sha256 = hashlib.sha256(key).digest()
key_b64 = base64.b64encode(key)
key_b64 = base64.b64encode(key).decode("utf-8")
key_sha256_b64 = base64.b64encode(key_sha256).decode("utf-8")
environ = create_environ(
base_url="http://localhost:8080",
Expand All @@ -162,7 +162,7 @@ def test_validation_success(self):
def test_validation_failure(self):
key = b"1234567890" + b"1234567890" + b"1234567890" + b"AA"
key_sha256 = hashlib.sha256(key).digest()
key_b64 = base64.b64encode(key)
key_b64 = base64.b64encode(key).decode("utf-8")
key_sha256_b64 = base64.b64encode(key_sha256).decode("utf-8")
environ = create_environ(
base_url="http://localhost:8080",
Expand All @@ -181,7 +181,7 @@ def test_validation_failure(self):
def test_validation_nothing_expected_failure(self):
key = b"1234567890" + b"1234567890" + b"1234567890" + b"AA"
key_sha256 = hashlib.sha256(key).digest()
key_b64 = base64.b64encode(key)
key_b64 = base64.b64encode(key).decode("utf-8")
key_sha256_b64 = base64.b64encode(key_sha256).decode("utf-8")
environ = create_environ(
base_url="http://localhost:8080",
Expand Down

0 comments on commit cc471a3

Please sign in to comment.