Closed pwqw closed 5 years ago
Which test fails? I don't see any test creating multiple Account
s.
I'm sorry, I expressed myself badly. The tests that failed me were private.
But, by definition, the slug
is unique = True
, so I assume that the AccountFactory
must have at least one of the following 2 options:
django_get_or_create = ('name', 'slug', )
or this one:
slug = Sequence(lambda n: 'test_%d' % n)
Sounds like you just need to fix your tests, and create different accounts:
account = AccountFactory()
another_account = AccountFactory(slug='account2')
Sometimes, some test fails throwing: