Skip to content

Commit

Permalink
changed context user in chained auth test
Browse files Browse the repository at this point in the history
NotAuthorized exception was not being thrown in CircleCI tests - perhaps because it was using the previous user?
  • Loading branch information
alycejenni committed Oct 8, 2018
1 parent 21d79c3 commit 552ee18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ckanext/datastore/tests/test_chained_auth_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ def test_chain_core_auth_functions(self):
assert_equals(raise_context.exception.message, user_list_message)
# check that the 'auth failed' msg doesn't fail because it's a partial
assert_raises(NotAuthorized,
lambda: check_access(u'user_list', {}, {}))
lambda: check_access(u'user_list',
{'ignore_auth': False,
'user': 'not_a_real_user'}, {}))

0 comments on commit 552ee18

Please sign in to comment.