﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15573	runtests.py sets incorrect SITE_ID when using Oracle	Erin Kelly	nobody	"Running the test suite under Oracle currently generates a large number of errors that look like this:

{{{
======================================================================
ERROR: test_shortcut_view (django.contrib.contenttypes.tests.ContentTypesTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""C:\Django\django.trunk\django\contrib\contenttypes\tests.py"", line 66, in test_shortcut_view
    current_site = Site.objects.get_current()
  File ""C:\Django\django.trunk\django\contrib\sites\models.py"", line 26, in get_current
    current_site = self.get(pk=sid)
  File ""C:\Django\django.trunk\django\db\models\manager.py"", line 132, in get
    return self.get_query_set().get(*args, **kwargs)
  File ""C:\Django\django.trunk\django\db\models\query.py"", line 349, in get
    % self.model._meta.object_name)
DoesNotExist: Site matching query does not exist.

----------------------------------------------------------------------
}}}

This seems to be a result of r14537.  Since the test setup does a syncdb followed by a flush on each database, the default Site object gets created twice.  Since the sequence reset no longer decreases the sequence value, the second Site object created, the one that sticks around and gets used for the tests, has an id of 2 instead of 1.  However, runtests.py forces the SITE_ID setting to be 1."	Bug	closed	Testing framework	dev	Normal	fixed	oracle site_id		Accepted	0	0	0	0	0	0
