'Test that student progress page does not break while checking for an unenrolled student.
Scenario: When instructor checks the progress of a student who is not enrolled in credit course.
It should return 200 response.'

@ddt.data(ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.split)
def test_unenrolled_student_progress_for_credit_course(self, default_store):

    course = CourseFactory.create(default_store=default_store)
    not_enrolled_user = UserFactory.create()
    admin = AdminFactory.create()
    self.assertTrue(self.client.login(username=admin.username, password='test'))
    CreditCourse.objects.create(course_key=course.id, enabled=True)
    CreditProvider.objects.create(provider_id='ASU', enable_integration=True, provider_url='https://credit.example.com/request')
    requirements = [{'namespace': 'grade', 'name': 'grade', 'display_name': 'Grade', 'criteria': {'min_grade': 0.52}}]
    set_credit_requirements(course.id, requirements)
    self._get_student_progress_page()
