﻿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
238	Database tests fail with sqlite	cthier@…	Jacob	"I get the following failures when running the database tests (runtests.py)
I am using SQLite3 with pysqlite2 v2.0.3 on OS X and Python 2.4

{{{
Got 12 errors:

'basic' model: API test failed
==============================
Code: 'a.id'
Line: 13
Expected: '1L\n'
Got: '1\n'

'custom_methods' model: API test failed
=======================================
Code: 'a.get_articles_from_same_day_1()'
Line: 11
Expected: '[Beatles reunite]\n'
Got: '[]\n'

'custom_methods' model: API test failed
=======================================
Code: 'a.get_articles_from_same_day_2()'
Line: 13
Expected: '[Beatles reunite]\n'
Got: '[]\n'

chuck:~/django/tests cthier$ python runtests.py           
Got 12 errors:

'basic' model: API test failed
==============================
Code: 'a.id'
Line: 13
Expected: '1L\n'
Got: '1\n'

'custom_methods' model: API test failed
=======================================
Code: 'a.get_articles_from_same_day_1()'
Line: 11
Expected: '[Beatles reunite]\n'
Got: '[]\n'

'custom_methods' model: API test failed
=======================================
Code: 'a.get_articles_from_same_day_2()'
Line: 13
Expected: '[Beatles reunite]\n'
Got: '[]\n'

'custom_methods' model: API test failed
=======================================
Code: 'b.get_articles_from_same_day_1()'
Line: 15
Expected: '[Area man programs in Python]\n'
Got: '[]\n'

'custom_methods' model: API test failed
=======================================
Code: 'b.get_articles_from_same_day_2()'
Line: 17
Expected: '[Area man programs in Python]\n'
Got: '[]\n'

'lookup' model: API test failed
===============================
Code: 'articles.get_count()'
Line: 26
Expected: '4L\n'
Got: u'4\n'

'lookup' model: API test failed
===============================
Code: 'articles.get_count(pub_date__exact=datetime(2005, 7, 27))'
Line: 28
Expected: '2L\n'
Got: u'2\n'

'lookup' model: API test failed
===============================
Code: ""articles.get_count(headline__startswith='Blah blah')""
Line: 30
Expected: '0L\n'
Got: u'0\n'

'many_to_one' model: API test failed
====================================
Code: 'a.reporter_id'
Line: 10
Expected: '1L\n'
Got: '1\n'

'many_to_one' model: API test failed
====================================
Code: 'r.first_name, r.last_name'
Line: 18
Expected: ""('John', 'Smith')\n""
Got: ""(u'John', u'Smith')\n""

'many_to_one' model: API test failed
====================================
Code: 'r.get_article_count()'
Line: 35
Expected: '2L\n'
Got: '2\n'

'one_to_one' model: API test failed
===================================
Code: 'p2.get_restaurant()'
Line: 20
Expected: ""Traceback (most recent call last):\n    ...\nRestaurantDoesNotExist: Restaurant does not exist for {'id__exact': 2L}\n""
Got: 'Traceback (most recent call last):\n  File ""/Users/cthier/django/tests/doctest.py"", line 1243, in __run\n    compileflags, 1) in test.globs\n  File ""<doctest one_to_one[8]>"", line 1, in ?\n    p2.get_restaurant()\n  File ""/opt/local/lib/python2.4/site-packages/django/core/meta.py"", line 87, in _curried\n    return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items()))\n  File ""/opt/local/lib/python2.4/site-packages/django/core/meta.py"", line 884, in method_get_related\n    return getattr(rel_mod, method_name)(**kwargs)\n  File ""/opt/local/lib/python2.4/site-packages/django/core/meta.py"", line 87, in _curried\n    return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items()))\n  File ""/opt/local/lib/python2.4/site-packages/django/core/meta.py"", line 1036, in function_get_object\n    raise does_not_exist_exception, ""%s does not exist for %s"" % (opts.object_name, kwargs)\nRestaurantDoesNotExist: Restaurant does not exist for {\'id__exact\': 2}\n'   
}}}
"	defect	closed	Database layer (models, ORM)	1.0	normal	fixed	sqlite		Unreviewed	0	0	0	0	0	0
