Opened 10 years ago

Closed 10 years ago

#7531 closed (fixed)

Usage of fixtures to set up sites breaks tests

Reported by: madkinder@… Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


#7517 led to this bug.
One might use fixtures to set up project's sites.

Steps to reproduce:

  1. Create the following initial_data.xml fixture:
    <?xml version="1.0" encoding="utf-8"?>
    <django-objects version="1.0">
      <object pk="1" model="">
        <field type="CharField" name="domain"></field>
        <field type="CharField" name="name">testserver</field>
  2. Run ./ test. The test fails with the following message:
    File "/usr/local/lib/python2.5/site-packages/django/contrib/sites/", line 5, in django.contrib.sites.tests
    Failed example:

The reason is obvious: is hardcoded into doctest.

Change History (1)

comment:1 Changed 10 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [7738]) Fixed #7531 -- Modified the sites test so that user-provided initial data doesn't cause breakage when executed from within user applications. Thanks for the report, madkinder@….

Note: See TracTickets for help on using tickets.
Back to Top