root@e3e8461d358a:/django/tests# ./runtests.py backends
Testing against Django installed in '/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django'
Creating test database for alias 'default'...
Got an error creating the test database: ERROR: database "test_postgres" already exists
Type 'yes' if you would like to try deleting the test database 'test_postgres', or 'no' to cancel: yes
Destroying old test database 'default'...
Creating test database for alias 'other'...
.EE.FFFFF...F...............F.sF.s..sE...ss.....EE.sss....F....EEEEEssssss
======================================================================
ERROR: test_cursor_contextmanager (backends.tests.BackendTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 634, in test_cursor_contextmanager
cursor.execute("select 1")
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 63, in execute
return self.cursor.execute(sql)
File "/usr/local/lib/python2.7/dist-packages/bpgsql.py", line 1347, in execute
result = self.connection._execute(cmd, args)
AttributeError: 'NoneType' object has no attribute '_execute'
======================================================================
ERROR: test_cursor_contextmanager_closing (backends.tests.BackendTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 644, in test_cursor_contextmanager_closing
self.assertTrue(cursor.closed)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 25, in __getattr__
cursor_attr = getattr(self.cursor, attr)
AttributeError: 'Cursor' object has no attribute 'closed'
======================================================================
ERROR: test_query_encoding (backends.tests.LastExecutedQueryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 340, in test_query_encoding
cursor = data.query.get_compiler('default').execute_sql(CURSOR)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/sql/compiler.py", line 786, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 81, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/bpgsql.py", line 1347, in execute
result = self.connection._execute(cmd, args)
File "/usr/local/lib/python2.7/dist-packages/bpgsql.py", line 1030, in _execute
self.__send('Q'+cmd+'\0')
File "/usr/local/lib/python2.7/dist-packages/bpgsql.py", line 768, in __send
nSent = self.__socket.send(data)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 17-18: ordinal not in range(128)
======================================================================
ERROR: test_select_ascii_array (backends.tests.PostgreSQLTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 243, in test_select_ascii_array
b = self._select(a)
File "/django/tests/backends/tests.py", line 238, in _select
cursor.execute("SELECT %s", (val,))
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/bpgsql.py", line 1350, in execute
raise result.error
DatabaseError: ERROR: syntax error at or near "[" at character 8
======================================================================
ERROR: test_select_unicode_array (backends.tests.PostgreSQLTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 248, in test_select_unicode_array
b = self._select(a)
File "/django/tests/backends/tests.py", line 238, in _select
cursor.execute("SELECT %s", (val,))
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/bpgsql.py", line 1350, in execute
raise result.error
DatabaseError: ERROR: syntax error at or near "[" at character 8
======================================================================
ERROR: test_check_constraints (backends.tests.FkConstraintsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 779, in test_check_constraints
a.save()
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 590, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 618, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 680, in _save_table
forced_update)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 724, in _do_update
return filtered._update(values) > 0
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/query.py", line 600, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/sql/compiler.py", line 1004, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/sql/compiler.py", line 786, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/bpgsql.py", line 1350, in execute
raise result.error
DatabaseError: ERROR: insert or update on table "backends_article" violates foreign key constraint "backends_article_reporter_id_fkey"
======================================================================
ERROR: test_disable_constraint_checks_context_manager (backends.tests.FkConstraintsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 763, in test_disable_constraint_checks_context_manager
a.save()
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 590, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 618, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 680, in _save_table
forced_update)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 724, in _do_update
return filtered._update(values) > 0
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/query.py", line 600, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/sql/compiler.py", line 1004, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/sql/compiler.py", line 786, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/bpgsql.py", line 1350, in execute
raise result.error
DatabaseError: ERROR: insert or update on table "backends_article" violates foreign key constraint "backends_article_reporter_id_fkey"
======================================================================
ERROR: test_disable_constraint_checks_manually (backends.tests.FkConstraintsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 745, in test_disable_constraint_checks_manually
a.save()
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 590, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 618, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 680, in _save_table
forced_update)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 724, in _do_update
return filtered._update(values) > 0
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/query.py", line 600, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/sql/compiler.py", line 1004, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/sql/compiler.py", line 786, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/bpgsql.py", line 1350, in execute
raise result.error
DatabaseError: ERROR: insert or update on table "backends_article" violates foreign key constraint "backends_article_reporter_id_fkey"
======================================================================
ERROR: test_integrity_checks_on_creation (backends.tests.FkConstraintsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 693, in test_integrity_checks_on_creation
a1.save()
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 590, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 618, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 699, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 732, in _do_insert
using=using, raw=raw)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/manager.py", line 92, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/query.py", line 921, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/sql/compiler.py", line 920, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/bpgsql.py", line 1350, in execute
raise result.error
DatabaseError: ERROR: insert or update on table "backends_article" violates foreign key constraint "backends_article_reporter_id_fkey"
======================================================================
ERROR: test_integrity_checks_on_update (backends.tests.FkConstraintsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 716, in test_integrity_checks_on_update
a1.save()
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 590, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 618, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 680, in _save_table
forced_update)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/base.py", line 724, in _do_update
return filtered._update(values) > 0
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/query.py", line 600, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/sql/compiler.py", line 1004, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/models/sql/compiler.py", line 786, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/db/backends/utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/bpgsql.py", line 1350, in execute
raise result.error
DatabaseError: ERROR: insert or update on table "backends_article" violates foreign key constraint "backends_article_reporter_id_fkey"
======================================================================
FAIL: test_cursor_executemany (backends.tests.BackendTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 521, in test_cursor_executemany
self.assertEqual(models.Square.objects.count(), 11)
AssertionError: 12 != 11
======================================================================
FAIL: test_cursor_executemany_with_empty_params_list (backends.tests.BackendTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 530, in test_cursor_executemany_with_empty_params_list
self.assertEqual(models.Square.objects.count(), 0)
AssertionError: 12 != 0
======================================================================
FAIL: test_cursor_executemany_with_iterator (backends.tests.BackendTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 536, in test_cursor_executemany_with_iterator
self.assertEqual(models.Square.objects.count(), 5)
AssertionError: 17 != 5
======================================================================
FAIL: test_cursor_executemany_with_pyformat (backends.tests.BackendTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/test/testcases.py", line 942, in skip_wrapper
return test_func(*args, **kwargs)
File "/django/tests/backends/tests.py", line 556, in test_cursor_executemany_with_pyformat
self.assertEqual(models.Square.objects.count(), 11)
AssertionError: 28 != 11
======================================================================
FAIL: test_cursor_executemany_with_pyformat_iterator (backends.tests.BackendTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/test/testcases.py", line 942, in skip_wrapper
return test_func(*args, **kwargs)
File "/django/tests/backends/tests.py", line 565, in test_cursor_executemany_with_pyformat_iterator
self.assertEqual(models.Square.objects.count(), 5)
AssertionError: 33 != 5
======================================================================
FAIL: test_unicode_fetches (backends.tests.BackendTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 588, in test_unicode_fetches
self.assertEqual(cursor.fetchone(), ('Clark', 'Kent'))
AssertionError: [u'Clark', u'Kent'] != (u'Clark', u'Kent')
======================================================================
FAIL: test_parameter_escaping (backends.tests.EscapingChecks)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 477, in test_parameter_escaping
self.assertEqual(cursor.fetchall()[0], ('%', '%d'))
AssertionError: [u'%', u'%d'] != (u'%', u'%d')
======================================================================
FAIL: test_parameter_escaping (backends.tests.EscapingChecksDebug)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 477, in test_parameter_escaping
self.assertEqual(cursor.fetchall()[0], ('%', '%d'))
AssertionError: [u'%', u'%d'] != (u'%', u'%d')
======================================================================
FAIL: test_pass_connection_between_threads (backends.tests.ThreadTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/django/tests/backends/tests.py", line 891, in test_pass_connection_between_threads
self.assertEqual(exceptions, [])
AssertionError: Lists differ: [MultipleObjectsReturned('get(... != []
First list contains 1 additional elements.
First extra element 0:
get() returned more than one Person -- it returned 2!
- [MultipleObjectsReturned('get() returned more than one Person -- it returned 2!',)]
+ []
----------------------------------------------------------------------
Ran 74 tests in 33.185s
FAILED (failures=9, errors=10, skipped=14)
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...