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 11101 Oracle fails admin_view tests when the whole suite is run -- transaction problem? Matt Boersma Matt Boersma "If you run either the ""auth"" or ""admin_view"" tests separately, they pass the Oracle backend. But if you run them together, the second one causes an insert error. Oracle thinks a constraint was violated because we're trying to INSERT another row with the username ""super"". But the previous INSERT should have been rolled back by the test runner, is my understanding. {{{ C:\projects\django-trunk\tests>runtests.py --settings=testsettings.oracle auth admin_views ====================================================================== FAIL: Doctest: django.contrib.auth.tests.__test__.BASIC_TESTS ---------------------------------------------------------------------- Traceback (most recent call last): File ""C:\projects\django-trunk\django\test\_doctest.py"", line 2180, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for django.contrib.auth.tests.__test__.BASIC_TESTS File ""C:\projects\django-trunk\django\contrib\auth\tests\__init__.py"", line unknown line number, in BASIC_TESTS ---------------------------------------------------------------------- File ""C:\projects\django-trunk\django\contrib\auth\tests\__init__.py"", line ?, in django.contrib.auth.tests.__test__.BASIC_TESTS Failed example: super = User.objects.create_superuser('super', 'super@example.com', 'super') Exception raised: Traceback (most recent call last): File ""C:\projects\django-trunk\django\test\_doctest.py"", line 1267, in __run compileflags, 1) in test.globs File """", line 1, in super = User.objects.create_superuser('super', 'super@example.com', 'super') File ""C:\projects\django-trunk\django\contrib\auth\models.py"", line 109, in create_superuser u = self.create_user(username, email, password) File ""C:\projects\django-trunk\django\contrib\auth\models.py"", line 105, in create_user user.save() File ""C:\projects\django-trunk\django\db\models\base.py"", line 410, in save self.save_base(force_insert=force_insert, force_update=force_update) File ""C:\projects\django-trunk\django\db\models\base.py"", line 486, in save_base result = manager._insert(values, return_id=update_pk) File ""C:\projects\django-trunk\django\db\models\manager.py"", line 177, in _insert return insert_query(self.model, values, **kwargs) File ""C:\projects\django-trunk\django\db\models\query.py"", line 1055, in insert_query return query.execute_sql(return_id) File ""C:\projects\django-trunk\django\db\models\sql\subqueries.py"", line 320, in execute_sql cursor = super(InsertQuery, self).execute_sql(None) File ""C:\projects\django-trunk\django\db\models\sql\query.py"", line 2359, in execute_sql cursor.execute(sql, params) File ""C:\projects\django-trunk\django\db\backends\oracle\base.py"", line 433, in execute raise e IntegrityError: ORA-00001: unique constraint (TEST_MBOERSMA.SYS_C00152043) violated ---------------------------------------------------------------------- File ""C:\projects\django-trunk\django\contrib\auth\tests\__init__.py"", line ?, in django.contrib.auth.tests.__test__.BASIC_TESTS Failed example: super.is_superuser Exception raised: Traceback (most recent call last): File ""C:\projects\django-trunk\django\test\_doctest.py"", line 1267, in __run compileflags, 1) in test.globs File """", line 1, in super.is_superuser AttributeError: type object 'super' has no attribute 'is_superuser' ---------------------------------------------------------------------- File ""C:\projects\django-trunk\django\contrib\auth\tests\__init__.py"", line ?, in django.contrib.auth.tests.__test__.BASIC_TESTS Failed example: super.is_active Exception raised: Traceback (most recent call last): File ""C:\projects\django-trunk\django\test\_doctest.py"", line 1267, in __run compileflags, 1) in test.globs File """", line 1, in super.is_active AttributeError: type object 'super' has no attribute 'is_active' ---------------------------------------------------------------------- File ""C:\projects\django-trunk\django\contrib\auth\tests\__init__.py"", line ?, in django.contrib.auth.tests.__test__.BASIC_TESTS Failed example: super.is_staff Exception raised: Traceback (most recent call last): File ""C:\projects\django-trunk\django\test\_doctest.py"", line 1267, in __run compileflags, 1) in test.globs File """", line 1, in super.is_staff AttributeError: type object 'super' has no attribute 'is_staff' ---------------------------------------------------------------------- Ran 102 tests in 30.906s FAILED (failures=1) }}} A simple workaround is to change the username in auth to ""super1"" or ""superduper"" or somesuch. But let's not do that until we know what's really going on here." closed Database layer (models, ORM) dev fixed oracle transaction test Erin Kelly Andrii Kurinnyi Accepted 1 0 0 0 0 0