#23864: UnitTest and sites framework
-----------------------------------+--------------------
Reporter: tomaszrycz | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------
I can't pass test with sites framework.
{{{
python2.7 manage.py test --settings=project.settings_sport
}}}
{{{
def main_page(request):
site = get_current_site(request)
print("%s" % site.name)
if site.name == 'sport':
return sport.views.main_page(request)
}}}
Test has failed because {{{site.name}}} during test has value
{{{example.com}}} but this value doesn't exist in database.
When I run server {{{site.name}}} value is correct ({{{sport}}}).
--
Ticket URL: <https://code.djangoproject.com/ticket/23864>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.4d4fcce6b27e0a93fcf7487c8632590e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.