Skip to content

develop repro unit test - #6536

Closed
chrisndodge wants to merge 1 commit into
ziafazal/add-pre-requisite-course-via-milestones-appfrom
cdodge/fix-auth-checks
Closed

develop repro unit test#6536
chrisndodge wants to merge 1 commit into
ziafazal/add-pre-requisite-course-via-milestones-appfrom
cdodge/fix-auth-checks

Conversation

@chrisndodge

Copy link
Copy Markdown
Contributor

No description provided.

@chrisndodge

Copy link
Copy Markdown
Contributor Author

@ziafazal @mattdrayer here's the unit test that reproduces what @cahrens experienced today.

The trouble is that the about page as well as the course_catalog look at the 'see_exists' permissions check in access.py. 'see_exists' is a combination of can_load() and can_enroll(). can_load() is always going to return False because of unfulfilled milestones.

If the enrollment window is in the past, then can_enroll() is also going to return False, causing these 404 errors to occur.

@chrisndodge

Copy link
Copy Markdown
Contributor Author

Oh - obviously this PR is to just pass along the code - this should get merged to the main branch when these tests pass (aka the real fix is in)

EDIT: I also left in a bunch of 'print' statements to help debug the unit tests....

@mattdrayer

Copy link
Copy Markdown
Contributor

@ziafazal -- let @chrisndodge and me know if you need more clarification on what needs to be done to address this issue, thanks!

@chrisndodge

Copy link
Copy Markdown
Contributor Author

My suggestion would be to cut/paste over the unit test over to the feature branch and make sure it succeeds I think the current state of the main feature branch should be OK with respect to this reported bug. Then we can delete this PR (don't merge).

@ziafazal

Copy link
Copy Markdown
Contributor

Yeah I have already pasted the required unit test in #6126 . Closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants