Skip to content

Commit

Permalink
Fix tests borked by merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanblock committed Jul 12, 2023
1 parent 3cc99c9 commit 8c7c655
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/test_http_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,20 @@ def test_jwe_session(monkeypatch):
"cookie": cookie,
},
}

session = session_read(mock)
assert "count" in session
assert session["count"] == 0


def test_custom_key(monkeypatch):
monkeypatch.setenv("ARC_APP_SECRET", "abcdefghijklmnop")
test_jwe_cookies(monkeypatch)
test_jwe_session(monkeypatch)
test_jwe_read_write()


def test_long_key(monkeypatch):
monkeypatch.setenv("ARC_APP_SECRET", "12345678901234567890123456789012")
test_jwe_cookies(monkeypatch)
test_jwe_session(monkeypatch)
test_jwe_read_write()


Expand All @@ -48,14 +47,14 @@ def test_short_key(monkeypatch):
jwcrypto.common.InvalidCEKeyLength,
match=r"Expected key of length 128 bits, got 48",
):
test_jwe_cookies(monkeypatch)

test_jwe_session(monkeypatch)
with pytest.raises(
jwcrypto.common.InvalidCEKeyLength,
match=r"Expected key of length 128 bits, got 48",
):
test_jwe_read_write()


def test_ddb_sign_unsign():
original = "123456"
secret = "1234567890"
Expand All @@ -73,7 +72,7 @@ def test_ddb_sign_unsign_fail():
assert valid == False


def test_jwe_read_write(arc_services, ddb_client):
def test_ddb_read_write(arc_services, ddb_client):
tablename = "sessions"
ddb_client.create_table(
TableName=tablename,
Expand Down

0 comments on commit 8c7c655

Please sign in to comment.