#16364: Missing tests for #14731
--------------------------------------+---------------------------------
               Reporter:  jezdez      |          Owner:  nobody
                   Type:  Bug         |         Status:  new
              Milestone:              |      Component:  contrib.auth
                Version:  1.3         |       Severity:  Release blocker
             Resolution:              |       Keywords:
           Triage Stage:  Unreviewed  |      Has patch:  0
    Needs documentation:  0           |    Needs tests:  0
Patch needs improvement:  0           |  Easy pickings:  0
                  UI/UX:  0           |
--------------------------------------+---------------------------------

Comment (by jezdez):

 Well, the tests I committed in r14891 were broken in a way that they were
 simply ignored (no showing any sign of failure of the wrongly named
 fixture file).

 I tried to fix those in r16400 (#16183).

 But then again the tests failed with r16481 (before removing the broken
 tests) on Postgres 9.0.4:

 {{{
 [~/Code/git/django/tests] env:django-dev $ python runtests.py
 --settings=django_testing.postgres auth
 Creating test database for alias 'default'...
 
......................................................................................................Problem
 installing fixture
 
'/Users/jezdez/Code/git/django/django/contrib/auth/fixtures/permissionstestdata.json':
 Traceback (most recent call last):
   File
 "/Users/jezdez/Code/git/django/django/core/management/commands/loaddata.py",
 line 174, in handle
     obj.save(using=using)
   File "/Users/jezdez/Code/git/django/django/core/serializers/base.py",
 line 169, in save
     models.Model.save_base(self.object, using=using, raw=True)
   File "/Users/jezdez/Code/git/django/django/db/models/base.py", line 556,
 in save_base
     result = manager._insert(values, return_id=update_pk, using=using)
   File "/Users/jezdez/Code/git/django/django/db/models/manager.py", line
 198, in _insert
     return insert_query(self.model, values, **kwargs)
   File "/Users/jezdez/Code/git/django/django/db/models/query.py", line
 1456, in insert_query
     return query.get_compiler(using=using).execute_sql(return_id)
   File "/Users/jezdez/Code/git/django/django/db/models/sql/compiler.py",
 line 810, in execute_sql
     cursor = super(SQLInsertCompiler, self).execute_sql(None)
   File "/Users/jezdez/Code/git/django/django/db/models/sql/compiler.py",
 line 754, in execute_sql
     cursor.execute(sql, params)
   File
 "/Users/jezdez/Code/git/django/django/db/backends/postgresql_psycopg2/base.py",
 line 44, in execute
     return self.cursor.execute(query, args)
 IntegrityError: duplicate key value violates unique constraint
 "django_content_type_app_label_model_key"
 DETAIL:  Key (app_label, model)=(contenttypes, contenttype) already
 exists.
 }}}

 With MySQL:

 {{{
 
......................................................................................................Problem
 installing fixture
 
'/Users/jezdez/Code/git/django/django/contrib/auth/fixtures/permissionstestdata.json':
 Traceback (most recent call last):
   File
 "/Users/jezdez/Code/git/django/django/core/management/commands/loaddata.py",
 line 174, in handle
     obj.save(using=using)
   File "/Users/jezdez/Code/git/django/django/core/serializers/base.py",
 line 169, in save
     models.Model.save_base(self.object, using=using, raw=True)
   File "/Users/jezdez/Code/git/django/django/db/models/base.py", line 556,
 in save_base
     result = manager._insert(values, return_id=update_pk, using=using)
   File "/Users/jezdez/Code/git/django/django/db/models/manager.py", line
 198, in _insert
     return insert_query(self.model, values, **kwargs)
   File "/Users/jezdez/Code/git/django/django/db/models/query.py", line
 1456, in insert_query
     return query.get_compiler(using=using).execute_sql(return_id)
   File "/Users/jezdez/Code/git/django/django/db/models/sql/compiler.py",
 line 810, in execute_sql
     cursor = super(SQLInsertCompiler, self).execute_sql(None)
   File "/Users/jezdez/Code/git/django/django/db/models/sql/compiler.py",
 line 754, in execute_sql
     cursor.execute(sql, params)
   File "/Users/jezdez/Code/git/django/django/db/backends/mysql/base.py",
 line 86, in execute
     return self.cursor.execute(query, args)
   File "/Library/Python/2.6/site-packages/MySQLdb/cursors.py", line 174,
 in execute
     self.errorhandler(self, exc, value)
   File "/Library/Python/2.6/site-packages/MySQLdb/connections.py", line
 36, in defaulterrorhandler
     raise errorclass, errorvalue
 IntegrityError: (1062, "Duplicate entry 'contenttypes-contenttype' for key
 'app_label'")
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16364#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to