﻿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
15850	Test runner fails when sites app not installed	adsva	Carl Meyer	"I don't have 'sites' in INSTALLED_APPS, and Changeset [16028] seems to break the test runner. 

Selected bits from the `manage.py test` traceback:

{{{
Traceback (most recent call last):

  ...

  File "".../django/db/backends/creation.py"", line 256, in create_test_db
    if Site is not None and Site.objects.using(self.connection.alias).count() == 1:
  File "".../django/db/models/query.py"", line 334, in count
    return self.query.get_count(using=self.db)
  File "".../django/db/models/sql/query.py"", line 401, in get_count
    number = obj.get_aggregation(using=using)[None]
  File "".../django/db/models/sql/query.py"", line 367, in get_aggregation
    result = query.get_compiler(using).execute_sql(SINGLE)
  File "".../django/db/models/sql/compiler.py"", line 735, in execute_sql
    cursor.execute(sql, params)
  File "".../django/db/backends/sqlite3/base.py"", line 226, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: no such table: django_site

}}}


I'm wondering if `Site = get_model('sites', 'Site')` is really a good way to check if the sites is installed. Looks like as soon as the Sites model is declared it registers itself to be discovered by get_model?"	Bug	closed	Testing framework	dev	Normal	fixed		schmilblick	Accepted	0	0	0	0	0	0
