Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Student tests using incorrect url #85

Closed
brianjbeach opened this issue Mar 26, 2018 · 1 comment · Fixed by #86
Closed

Student tests using incorrect url #85

brianjbeach opened this issue Mar 26, 2018 · 1 comment · Fixed by #86
Assignees

Comments

@brianjbeach
Copy link
Contributor

If I understand the intent of these tests, you should be sending the request to /initial_student? rather than /initial_unknown?. Also, in the first of the two tests you are passing a role of "Staff". Staff is the name used in the decorator, but you should be passing either Administrator or Instructor in the in the request.

def test_access_to_oauth_resource_student_as_staff(self):
"""Verify staff doesn't have access to student only."""
consumers = self.consumers
url = 'http://localhost/initial_unknown?'
staff_url = self.generate_launch_request(
consumers, url, roles='Staff'
)
self.app.get(staff_url)
self.assertTrue(self.has_exception())
def test_access_to_oauth_resource_student_as_unknown(self):
"""Verify staff doesn't have access to student only."""
consumers = self.consumers
url = 'http://localhost/initial_unknown?'
unknown_url = self.generate_launch_request(
consumers, url, roles='FooBar'
)
self.app.get(unknown_url)
self.assertTrue(self.has_exception())

@pdpinch
Copy link
Member

pdpinch commented Jun 22, 2018

@brianjbeach Amir opened a PR to fix this. Can you take a look and give us some feedback?

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 a pull request may close this issue.

3 participants