def test_check_access_fails_when_it_should(self):
     mixin = IdPHandlerViewMixin()
     mixin.set_sp('test_sp_with_custom_processor_that_doesnt_allow_access')
     mixin.set_processor()
     with pytest.raises(PermissionDenied):
         mixin.check_access(HttpRequest())
 def test_check_access_works(self):
     mixin = IdPHandlerViewMixin()
     mixin.set_sp('test_generic_sp')
     mixin.set_processor()
     mixin.check_access(HttpRequest())