1329: cannot load test_scmtools.json fixtures

daniel.s********@gmai***** (Google Code) (Is this you? Claim this profile.)
Oct. 5, 2009
What version are you running?
ad2464adb4f2

What's the URL of the page containing the problem?


What steps will reproduce the problem?
./reviewboard/manage.py syncdb
./reviewboard/manage.py loaddata test_users test_scmtools 
test_reviewrequests

What is the expected output? What do you see instead?
Error:
~/reviewboard-dev/reviewboard$ ./reviewboard/manage.py loaddata test_users 
test_scmtools test_reviewrequests
Installing json fixture 'test_users' from '/home/pil/reviewboard-
dev/reviewboard/reviewboard/accounts/fixtures'.
Installing json fixture 'test_scmtools' from '/home/pil/reviewboard-
dev/reviewboard/reviewboard/scmtools/fixtures'.
Problem installing fixture '/home/pil/reviewboard-
dev/reviewboard/reviewboard/scmtools/fixtures/test_scmtools.json': 
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Django-1.1-
py2.5.egg/django/core/management/commands/loaddata.py", line 153, in handle
    obj.save()
  File "/usr/lib/python2.5/site-packages/Django-1.1-
py2.5.egg/django/core/serializers/base.py", line 163, in save
    models.Model.save_base(self.object, raw=True)
  File "/usr/lib/python2.5/site-packages/Django-1.1-
py2.5.egg/django/db/models/base.py", line 474, in save_base
    rows = manager.filter(pk=pk_val)._update(values)
  File "/usr/lib/python2.5/site-packages/Django-1.1-
py2.5.egg/django/db/models/query.py", line 444, in _update
    return query.execute_sql(None)
  File "/usr/lib/python2.5/site-packages/Django-1.1-
py2.5.egg/django/db/models/sql/subqueries.py", line 120, in execute_sql
    cursor = super(UpdateQuery, self).execute_sql(result_type)
  File "/usr/lib/python2.5/site-packages/Django-1.1-
py2.5.egg/django/db/models/sql/query.py", line 2369, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/python2.5/site-packages/Django-1.1-
py2.5.egg/django/db/backends/util.py", line 19, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.5/site-packages/Django-1.1-
py2.5.egg/django/db/backends/sqlite3/base.py", line 193, in execute
    return Database.Cursor.execute(self, query, params)
IntegrityError: column class_name is not unique
david
#1 david
I think I'm going to say this is not a bug. We want separate fixtures for "regular
install" and "unit tests", since the latter will have more things than the former. If
you want to load them by hand, you'll have to first delete the existing scmtools items.
  • +NotABug