Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anoncreds - Add unit testing #2672

Merged
merged 2 commits into from
Dec 13, 2023
Merged

Anoncreds - Add unit testing #2672

merged 2 commits into from
Dec 13, 2023

Conversation

jamshale
Copy link
Contributor

Adds unit tests for routes, holder, verifier, issuer.

Screenshot from 2023-12-13 10-50-52

There is still more unit testing to do. Mainly the revocation.py file. Also, there was a tricky part with scanning the wallet in holder and using async for I haven't figured out yet. Also there is some error handling I haven't covered.

I tried to create objects with the anoncreds library as much as possible to catch problems in the future when using the library. When I couldn't manage to make that work I would mock the object a minimally as possible. I also had some trouble creating some DB/wallet Entry responses. To get around this i created some minimal class objects. These are used in holder and issuer files.

I made 2 small changes to src code. In verifier.py changed an error handling message and in holder.py added the mime-types attribute constant that seemed to be missing.

Copy link

sonarcloud bot commented Dec 13, 2023

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Member

@ianco ianco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, very thorough!

@swcurran swcurran merged commit 104f509 into hyperledger:main Dec 13, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants