  from django.conf.urls.defaults import *
  from django.contrib import admin
  
  admin.autodiscover()
  
  urlpatterns = patterns('',
      (r'^admin/', include(admin.site.urls)),
  )
 
</s> remove     (r'^admin/', include(admin.site.urls)),
 </s> add     (r'^admin/', include(admin_site.urls)), </s> remove         u.user_permissions.add(Permission.objects.get(codename='add_comment'))
        u.user_permissions.add(Permission.objects.get(codename='change_comment'))
        u.user_permissions.add(Permission.objects.get(codename='delete_comment'))
 </s> add         perms = Permission.objects.filter(
            content_type__app_label = 'comments', 
            codename__endswith = 'comment'
        )
        for perm in perms:
            u.user_permissions.add(perm)
# Make a new AdminSite to avoid picking up the deliberately broken admin
# modules in other tests.
admin_site = admin.AdminSite()
admin_site.register(Comment, CommentsAdmin)
  from django.conf.urls.defaults import *
  from django.contrib import admin
  
# Make a new AdminSite to avoid picking up the deliberately broken admin
# modules in other tests.
admin_site = admin.AdminSite()
admin_site.register(Comment, CommentsAdmin)
  
  urlpatterns = patterns('',
      (r'^admin/', include(admin.site.urls)),
  )
keep keep keep replace keep keep keep keep
 Fixed a couple of test-ordering-dependant failures introduced in [11639] that caused test failures when running the whole test suite.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11645 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
tests/regressiontests/comment_tests/urls_admin.py