#16713: Fixture loading for tests ignore database specific names
------------------------------------+-----------------------------------
               Reporter:  brent@…   |          Owner:  nobody
                   Type:  Bug       |         Status:  new
              Milestone:            |      Component:  Testing framework
                Version:  1.3       |       Severity:  Normal
             Resolution:            |       Keywords:  fixtures, multidb
           Triage Stage:  Accepted  |      Has patch:  0
    Needs documentation:  0         |    Needs tests:  0
Patch needs improvement:  0         |  Easy pickings:  0
                  UI/UX:  0         |
------------------------------------+-----------------------------------
Changes (by aaugustin):

 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 This test shows how this feature works:
 
https://code.djangoproject.com/browser/django/trunk/tests/regressiontests/multiple_database/tests.py#L1621

 With the following changes, your tests pass:
 {{{

 --- testapp/tests.py.orig       2011-08-28 12:11:44.000000000 +0200
 +++ testapp/tests.py    2011-08-28 12:11:02.000000000 +0200
 @@ -12,7 +12,7 @@
      """
      multi_db = True

 -    fixtures = ['people.default.json']
 +    fixtures = ['people']

      def test_fixtures_loaded_to_default(self):
          """
 @@ -35,7 +35,7 @@
      This should load the one into default only.
      """

 -    fixtures = ['people.default.json']
 +    fixtures = ['people']

      def test_fixtures_loaded_to_default(self):
          """
 @@ -61,7 +61,7 @@
      """
      multi_db = True

 -    fixtures = ['people.default.json', 'morepeople.core.json']
 +    fixtures = ['people', 'morepeople']

      def test_fixtures_loaded_to_default(self):
          """
 }}}

 I think it's a bug. The docs say it's possible to pass only the "base
 name" of the fixture and let Django figure out the rest (database, format,
 compression); they don't say it's mandatory.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16713#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to