@pytest.mark.django_db
def test_verify_user_empty_email(trans_member):
 with pytest.raises(EmailAddress.DoesNotExist):
  EmailAddress.objects.get(user=trans_member)
 assert (trans_member.email == '')
 with pytest.raises(ValidationError):
  accounts.utils.verify_user(trans_member)
 with pytest.raises(EmailAddress.DoesNotExist):
  EmailAddress.objects.get(user=trans_member)

@ pytest . mark . django_db def test_verify_user_empty_email ( trans_member ) : with pytest . raises ( EmailAddress . DoesNotExist ) : EmailAddress . objects . get ( user = trans_member ) assert ( trans_member . email == '' ) with pytest . raises ( ValidationError ) : accounts . utils . verify_user ( trans_member ) with pytest . raises ( EmailAddress . DoesNotExist ) : EmailAddress . objects . get ( user = trans_member )
test verifying user using verify_user function .