Code

Opened 8 years ago

Closed 7 years ago

#2916 closed defect (fixed)

[patch] create_test_db() in the django's unittest framework is supposed to automatically run syncdb

Reported by: remco@… Owned by: russellm
Component: Testing framework Version: master
Severity: normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

According to the documentation (http://www.djangoproject.com/documentation/testing/) django.test.util.create_test_db is supposed to do a syncdb. In the current implementation django's own simple testrunner does the syncdb. This patch moves the call to syncdb from simple.py to utils.py so people using other test frameworks (I use py.test) will also have an automatic syncdb.

Attachments (1)

test.diff (1.5 KB) - added by remco@… 8 years ago.
patch

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by remco@…

patch

comment:1 Changed 8 years ago by russellm

  • Owner changed from adrian to russellm

comment:2 Changed 8 years ago by adrian

  • Summary changed from [PATCH] create_test_db() in the django's unittest framework is supposed to automatically run syncdb to [patch] create_test_db() in the django's unittest framework is supposed to automatically run syncdb

comment:3 Changed 7 years ago by Simon G. <dev@…>

  • Triage Stage changed from Unreviewed to Ready for checkin

comment:4 Changed 7 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [4541]) Fixed #2916 -- Moved syncdb call out of simple test runner and into create_test_db, to match documentation and simplify testing process for people using other test frameworks. Thanks, remco@….

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.