Ticket #2879: testing.patch

File testing.patch, 1.4 KB (added by Dirk Datzert <dummy@…>, 17 years ago)

testing contrib to flush database during tests

  • django/contrib/testing/views.py

     
     1from django.core.management import flush as _flush
     2from django.core.management import load_data
     3from django.http import HttpResponse
     4
     5def flush(request):
     6        _flush(verbosity=True, interactive=False)
     7        load_data(['test_data'], verbosity=True)
     8        return HttpResponse('Done')
  • django/contrib/testing/urls.py

    Eigenschaftsänderungen: django/contrib/testing/views.py
    ___________________________________________________________________
    Name: svn:eol-style
       + native
    
    
    Eigenschaftsänderungen: django/contrib/testing/__init__.py
    ___________________________________________________________________
    Name: svn:eol-style
       + native
    
     
     1from django.conf import settings
     2from django.conf.urls.defaults import *
     3
     4urlpatterns = patterns('',
     5    ('^flush/$', 'django.contrib.testing.views.flush'),
     6)
Back to Top