def test_id_from_user(self):
            user = User.objects.create_user('user', 'user@example.com', 'user')
            self.assertEqual(self.analytics._id_from_user(user),
                             'User %d' % user.pk)
            self.assertRaises(IdentificationError,
                              self.analytics._id_from_user, None)
dataset/ETHPy150Open e-loue/django-lean/django_lean/lean_analytics/tests.py/TestMixpanel.test_id_from_user/original