forked from DGNum/gestioCOF
core -- Apply black + isort to all files
This commit is contained in:
parent
104e71dcf6
commit
fdd2b35289
196 changed files with 10727 additions and 8365 deletions
|
@ -12,17 +12,17 @@ from gestioncof.models import CofProfile, User
|
|||
|
||||
class SimpleTest(TestCase):
|
||||
def test_delete_user(self):
|
||||
u = User(username='foo', first_name='foo', last_name='bar')
|
||||
u = User(username="foo", first_name="foo", last_name="bar")
|
||||
|
||||
# to each user there's a cofprofile associated
|
||||
u.save()
|
||||
self.assertTrue(CofProfile.objects.filter(user__username='foo').exists())
|
||||
self.assertTrue(CofProfile.objects.filter(user__username="foo").exists())
|
||||
|
||||
# there's no point in having a cofprofile without a user associated.
|
||||
u.delete()
|
||||
self.assertFalse(CofProfile.objects.filter(user__username='foo').exists())
|
||||
self.assertFalse(CofProfile.objects.filter(user__username="foo").exists())
|
||||
|
||||
# there's no point in having a user without a cofprofile associated.
|
||||
u.save()
|
||||
CofProfile.objects.get(user__username='foo').delete()
|
||||
self.assertFalse(User.objects.filter(username='foo').exists())
|
||||
CofProfile.objects.get(user__username="foo").delete()
|
||||
self.assertFalse(User.objects.filter(username="foo").exists())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue