django-siwe-auth icon indicating copy to clipboard operation
django-siwe-auth copied to clipboard

Write tests for Wallet model and authentication logic

Open payton opened this issue 3 years ago • 3 comments

The title says it all.

payton avatar Jan 31 '22 04:01 payton

Similarly, it'd be great to have an example for how projects with django-siwe-auth should authenticate users in their unit tests.

We probably need a minimal python implementation of MetaMask's ECDSA key setup & signing.

pconerly avatar Jun 03 '22 23:06 pconerly

Oh, I think we can use the same tools that siwe-py used in their tests: https://github.com/spruceid/siwe-py/blob/main/tests/test_siwe.py mainly eth_account

pconerly avatar Jun 04 '22 00:06 pconerly

TODO:

  1. Create tests for Wallet model
  2. Create tests around SiweBackend https://github.com/payton/django-siwe-auth/blob/e43e76e7238119a308e7633edbe24b585a62e2c8/siwe_auth/backend.py#L41-L45

payton avatar Aug 29 '22 15:08 payton