LeoneBacciu / django-email-verification

A Django app that takes care of verifying a users's email address and activating their profile.
MIT License
356 stars 56 forks source link

Unable to confirm token using selenium when testing #70

Closed millerthegorilla closed 2 years ago

millerthegorilla commented 2 years ago

Hi, I am using pytest and seleniumbase, a wrapper around selenium, and when I recover the link from the email during testing, and then visit that page. I am getting the error page text (ie 'invalid token'). I have tried setting a breakpoint, and using jwt.decode, as inside token.py, and the token checks out as correct, and the user is definitely present in the database with the correct email address. I have also tried importing and using the check_token function from the code and it returns true. Can you recommend something that I can try, with regards to getting the selenium test to work? I cannot think what the problem might be.

The token validation works successfully if I use python manage.py runserver....

millerthegorilla commented 2 years ago

Doh. I needed to set EMAIL_PAGE_DOMAIN to the fixture domain.