def test_userprofile(self):
        new_user = User()
        new_user.username = 'new_user'
        new_user.password = 'new_user_pw'
        new_user.save()

        new_up = UserProfile()
        new_up.user = new_user
        new_up.save()

        self.assertEqual(new_user.userprofile, new_up)
Test that a userprofile connects properly to a user.
dataset/ETHPy150Open openlearningtools/opencompetencies/users/tests.py/ModelTests.test_userprofile