@pytest.mark.django_db
def test_verify_user_already_verified(member_with_email):
 accounts.utils.verify_user(member_with_email)
 with pytest.raises(ValueError):
  accounts.utils.verify_user(member_with_email)
 EmailAddress.objects.get(user=member_with_email, email=member_with_email.email, primary=True, verified=True)

@ pytest . mark . django_db def test_verify_user_already_verified ( member_with_email ) : accounts . utils . verify_user ( member_with_email ) with pytest . raises ( ValueError ) : accounts . utils . verify_user ( member_with_email ) EmailAddress . objects . get ( user = member_with_email , email = member_with_email . email , primary = True , verified = True )
test verifying user using verify_user function that has an allauth .