def test_non_mobile_available(self, role, should_succeed): self.init_course_access() # set mobile_available to False for the test course self.course.mobile_available = False self.store.update_item(self.course, self.user.id) self._verify_response(should_succeed, MobileAvailabilityError(), role)
def _is_descriptor_mobile_available(descriptor): """ Returns if descriptor is available on mobile. """ return ACCESS_GRANTED if descriptor.mobile_available else MobileAvailabilityError( )