#11936: Proxy models' names are too long for django.contrib.auth which causes
weird
test failures
---------------------------------------------------+------------------------
Reporter: ryszard | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.1
Resolution: | Keywords: test,
only, deferred fields
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by ryszard):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
The error that results from runnign the tests with the attached models
(note that test_bbb fails, even though it contains only a `pass`
statement!).
(ryszard hacksaw):~/setjam/setjam% ./manage.py test pathology
Creating test database...
Creating table pathology_pathologicallylongname
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table django_flatpage
Installing index for auth.Permission model
Installing index for auth.Message model
Installing index for admin.LogEntry model
Installing index for flatpages.FlatPage model
.E
======================================================================
ERROR: test_bbb (pathology.tests.SimpleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ryszard/setjam/site-python/django/test/testcases.py", line
242, in __call__
self._pre_setup()
File "/home/ryszard/setjam/site-python/django/test/testcases.py", line
217, in _pre_setup
self._fixture_setup()
File "/home/ryszard/setjam/site-python/django/test/testcases.py", line
440, in _fixture_setup
return super(TestCase, self)._fixture_setup()
File "/home/ryszard/setjam/site-python/django/test/testcases.py", line
222, in _fixture_setup
call_command('flush', verbosity=0, interactive=False)
File "/home/ryszard/setjam/site-
python/django/core/management/__init__.py", line 166, in call_command
return klass.execute(*args, **defaults)
File "/home/ryszard/setjam/site-python/django/core/management/base.py",
line 222, in execute
output = self.handle(*args, **options)
File "/home/ryszard/setjam/site-python/django/core/management/base.py",
line 351, in handle
return self.handle_noargs(**options)
File "/home/ryszard/setjam/site-
python/django/core/management/commands/flush.py", line 61, in
handle_noargs
emit_post_sync_signal(models.get_models(), verbosity, interactive)
File "/home/ryszard/setjam/site-python/django/core/management/sql.py",
line 205, in emit_post_sync_signal
interactive=interactive)
File "/home/ryszard/setjam/site-python/django/dispatch/dispatcher.py",
line 166, in send
response = receiver(signal=self, sender=sender, **named)
File "/home/ryszard/setjam/site-
python/django/contrib/auth/management/__init__.py", line 28, in
create_permissions
defaults={'name': name, 'content_type': ctype})
File "/home/ryszard/setjam/site-python/django/db/models/manager.py",
line 123, in get_or_create
return self.get_query_set().get_or_create(**kwargs)
File "/home/ryszard/setjam/site-python/django/db/models/query.py", line
335, in get_or_create
obj.save(force_insert=True)
File "/home/ryszard/setjam/site-python/django/db/models/base.py", line
410, in save
self.save_base(force_insert=force_insert, force_update=force_update)
File "/home/ryszard/setjam/site-python/django/db/models/base.py", line
495, in save_base
result = manager._insert(values, return_id=update_pk)
File "/home/ryszard/setjam/site-python/django/db/models/manager.py",
line 177, in _insert
return insert_query(self.model, values, **kwargs)
File "/home/ryszard/setjam/site-python/django/db/models/query.py", line
1087, in insert_query
return query.execute_sql(return_id)
File "/home/ryszard/setjam/site-
python/django/db/models/sql/subqueries.py", line 320, in execute_sql
cursor = super(InsertQuery, self).execute_sql(None)
File "/home/ryszard/setjam/site-python/django/db/models/sql/query.py",
line 2369, in execute_sql
cursor.execute(sql, params)
File "/home/ryszard/setjam/site-
python/django/db/backends/mysql/base.py", line 84, in execute
return self.cursor.execute(query, args)
File "/home/buildbot/bbenv/lib/python2.6/site-
packages/MySQL_python-1.2.3c1-py2.6-linux-i686.egg/MySQLdb/cursors.py",
line 175, in execute
if not self._defer_warnings: self._warning_check()
File "/home/buildbot/bbenv/lib/python2.6/site-
packages/MySQL_python-1.2.3c1-py2.6-linux-i686.egg/MySQLdb/cursors.py",
line 89, in _warning_check
warn(w[-1], self.Warning, 3)
Warning: Data truncated for column 'name' at row 1
----------------------------------------------------------------------
Ran 1 test in 0.621s
FAILED (errors=1)
Destroying test database...
--
Ticket URL: <http://code.djangoproject.com/ticket/11936#comment:1>
Django <http://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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---