Use pk instead of id. Use django.core.urlresolvers.reverse in tests.