Hello,

I'm currently trying to migrate a project from django 1.5.1 to the newest 
version. I got stuck in the version 1.7. The only test that is not passing 
was made to try to get the e-mail from an admin:

@pytest.mark.django_db
@pytest.mark.admin_client
def test_url_to_edit_object_admin(admin_client):


    user = User.objects.get(username="admin")


    response = admin_client.get(core_util.url_to_edit_object_admin(user))


    assert response.status_code == 200
    assert "ad...@example.com" in response.content


When the function url_to_edit_object_admin is called, it will try to 
reverse 'admin:auth_user_change' but on django 1.7 it does not work (Django 
1.6 works just fine). I checked if this was deprecated from django 1.6, but 
I didn't find anything in the django documentation documentation.

The url_to_edit_object_admin function:

def url_to_edit_object_admin(object):
    return reverse('admin:%s_%s_change' % (object._meta.app_label, object.
_meta.module_name),
                   args=[object.id])



The error message:

E     NoReverseMatch: Reverse for 'auth_user_change' with arguments '(1,)' 
and keyword arguments '{}' not found. 0 pattern(s) tried: []

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9612246e-692b-4418-bd79-a5fd23bf8f84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to