[Django] #23864: UnitTest and sites framework

11 views
Skip to first unread message

Django

unread,
Nov 18, 2014, 7:42:24 AM11/18/14
to django-...@googlegroups.com
#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.

Django

unread,
Nov 18, 2014, 2:25:43 PM11/18/14
to django-...@googlegroups.com
#23864: UnitTest and sites framework
-----------------------------------+--------------------------------------
Reporter: tomaszrycz | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: 1.7
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by claudep):

* status: new => closed
* needs_better_patch: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_docs: => 0


Comment:

Please use support channels and only use this tracker for bugs in Django.
https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels

--
Ticket URL: <https://code.djangoproject.com/ticket/23864#comment:1>

Reply all
Reply to author
Forward
0 new messages