def test_profiles_not_conflicted(self): """ Tests that second profile is created and not conflicted with the first user nor his profile. """ u1 = UserF.create(username='******') p1 = FortuitusProfile.objects.get(user_id=u1.pk) u2 = UserF.create(username='******') p2 = FortuitusProfile.objects.get(user_id=u2.pk) self.assertNotEqual(p1, p2)
def test_profile_created(self): """ Tests that profile is automatically created along with User. """ u = UserF.create() p = FortuitusProfile.objects.all()[0] self.assertEqual(u.fortuitusprofile, p)