Hi Rich, django-users is the appropriate place to ask "is it a bug?" type 
questions. We try not to use this mailing list as a second level support 
channel, otherwise it'd get really noisy. Thanks for understanding.

By the way, Django 1.7 is no longer supported. Please make sure you can 
reproduce the issue on Django master so we don't spend time debugging 
issues that have since been fixed.

On Wednesday, May 4, 2016 at 7:13:42 PM UTC-4, Rich Rauenzahn wrote:
>
>
> I'm in the middle of trying to track down a problem with loading fixtures 
> during unit tests -- I'm hesitant to call it a bug in Django 1.7, but the 
> inconsistent behavior is really stumping me.
>
> Essentially I've made a fixture via
>
>    manage dumpdata --indent=3 -e sessions -e admin -e contenttypes -e 
> auth.Permission > test-fixtures.json
>
> If I add that fixtures to my TestCase, it sometimes works if I run each 
> test individually (using Django Nose)  -- 
>
>    manage test --failfast test_it:TestClass.test_detail
>    manage test --failfast test_it:TestClass.test_list
>
> But if I run them together, 
>
>    manage test --failfast test_it:TestClass
>
> I get errors about duplicate/unique problems.  Essentially a row is 
> attempted to be added twice. 
>
>     IntegrityError: Problem installing fixture 'test-fixtures.json': Could 
> not load app.Branch(pk=1): duplicate key value violates unique constraint 
> "app_branch_name_49810fc21046d2e2_uniq"
> DETAIL:  Key (name)=(mock) already exists.
>
> (I've also posted this earlier today on django-users, where I also 
> included some postgres output).  The tests within the TestCase (or 
> TransactionTestCase) can be empty ("pass") and still reproduce.
>
> As best I can tell it doesn't only happen when combined -- sometimes I can 
> get it to happen in a class with a single TestCase.  And it isn't always 
> the same model that has the conflict.
>
> Has anyone seen anything like this behavior before?  It's as if sometimes 
> the fixtures are installed in different order each time, which makes me 
> think of some dict.keys() that doesn't return the same order every time.
>
> Rich
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/410627d6-ab8c-4b6a-b468-54a3511e6c48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to