Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Whitehead <[email protected]>
  • Loading branch information
andrewwhitehead committed Sep 8, 2023
1 parent 3fb54a9 commit e29e4bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions wrappers/javascript/aries-askar-nodejs/tests/store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ describe('Store and Session', () => {

await store.removeProfile(profile)

// Profile key is cached
// Opening removed profile should fail
const session5 = await store.session(profile).open()
await expect(session5.count(firstEntry)).resolves.toStrictEqual(0)
await expect(session5.count(firstEntry)).rejects.toThrowError(AriesAskarError)
await session5.close()

// Unknown profile
Expand Down
7 changes: 3 additions & 4 deletions wrappers/python/tests/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,12 @@ async def test_profile(store: Store):

assert set(await store.list_profiles()) == {active_profile}

# profile key is cached
async with store.session(profile) as session:
assert (
# opening removed profile should fail
with raises(AskarError, match="removed"):
async with store.session(profile) as session:
await session.count(
TEST_ENTRY["category"], {"~plaintag": "a", "enctag": "b"}
)
) == 0

with raises(AskarError, match="not found"):
async with store.session("unknown profile") as session:
Expand Down

0 comments on commit e29e4bc

Please sign in to comment.