def test_add_userprofile(self):
        new_user = User.objects.create_user(username='randy', password='pw')
        my_admin.add_userprofile(new_user)
        self.assertTrue(hasattr(new_user, 'userprofile'))
Make sure new user gets a userprofile.
dataset/ETHPy150Open openlearningtools/opencompetencies/users/tests.py/MyAdminTests.test_add_userprofile