Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
fix: post filter vs tag filter and int tests
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
  • Loading branch information
dbluhm committed Jan 17, 2022
1 parent 0040154 commit b4ce3a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion acapy_plugin_toolbox/holder/v0_1/messages/cred_get_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def handle(self, context: RequestContext, responder: BaseResponder):
session = await context.session()

credentials = await CredExRecord.query(
session, tag_filter={"role": CredExRecord.ROLE_HOLDER}
session, post_filter_positive={"role": CredExRecord.ROLE_HOLDER}
)

if self.states:
Expand Down
10 changes: 5 additions & 5 deletions int/tests/test_holder.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ async def test_credentials_get_list(
"@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/admin-holder/0.1/credentials-get-list"
}
)
cred_set = set([result.credential_exchange_id for result in cred.results])
cred_get_list_set = set(
[cred["credential_exchange_id"] for cred in credentials_get_list["results"]]
)
cred_set = {result.credential_exchange_id for result in cred.results}
cred_get_list_set = {
cred["credential_exchange_id"] for cred in credentials_get_list["results"]
}
assert (
credentials_get_list["@type"]
== "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/admin-holder/0.1/credentials-list"
)
assert cred_set.issubset(cred_get_list_set)
assert cred_get_list_set <= cred_set

0 comments on commit b4ce3a2

Please sign in to comment.