You should use `UserFactory` to mock students. See `common/djangoapps/student/tests/factories.py`