On Friday, May 6, 2016 at 4:11:42 AM UTC-7, Alasdair Nicol wrote:
>
>
>>
>> But In this particular run I'm currently tracing, rich is already in the 
>> db (as the only entry) as pk=5 (via fixture loading process).   For one, 
>> this tells me the sequence generators aren't always resetting between 
>> fixture loads/tests.
>>
>>  
> Sequences *are not* reset between test cases by default [2]. Perhaps you 
> need to change your code so that it doesn't assume that the user has pk=1, 
> or set reset_sequences = True.
>

My code didn't make that assumption -- it appeared that the fixture loading 
code did.
 

>
> It's difficult to offer any more advice, because you haven't posted any 
> code that can reproduce the problem. It doesn't need to be the actual code, 
> in fact the simpler the example is the better.
>

I spent some cycles trying to reproduce on a fresh Django install, but 
couldn't based on my assumptions.  As I replied later, the problem was a 
setUpClass() creating objects via a factory that persisted between 
TestCase's that did fixture loading, and they conflicted.

Rich 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3f1c6bfe-45be-48d8-bb94-a9a43acb8eb6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to