def test_unique_username_created(self, username_mock):
        User(username='edx_id').save()
        users.create_lti_user('lti_user_id', self.lti_consumer)
        self.assertEqual(username_mock.call_count, 2)
        self.assertEqual(User.objects.count(), 2)
        user = User.objects.get(username='new_edx_id')
        self.assertEqual(user.email, 'new_edx_id@lti.example.com')