def testEndpointsReturn401(self):

    for rule in main.app.url_map.iter_rules():
      logging.debug('Testing endpoint "%s"', rule.endpoint)

      # special case static files, no auth..
      if rule.endpoint == 'static':
        continue

      # User a dummy object_id on endpoints
      # that need on, just to construct a URL
      if rule.arguments == set():
        arguments = {}
      if rule.arguments == set(['object_id']):
        arguments = {'object_id': '12345'}
      elif not has_no_empty_params(rule):
        logging.error(rule.arguments)
        assert False

      with main.app.test_request_context():
        url = flask.url_for(rule.endpoint, **arguments)

      logging.debug('  url = "%s"', url)

      # Only 2 special cases cause redirects - only human endpoints
      if rule.endpoint in {'root', 'user.use_invite'}:
        response = self.client.get(url)
        self.assertEquals(response.status_code, 302)
        continue

      # Filter out rules we can't navigate to in a browser
      # and rules that require parameters
      if 'GET' in rule.methods:
        response = self.client.get(url)
        self.assertEquals(response.status_code, 401)

      if 'POST' in rule.methods:
        response = self.client.post(url)
        self.assertEquals(response.status_code, 401)

      if 'DELETE' in rule.methods:
        response = self.client.delete(url)
        self.assertEquals(response.status_code, 401)
Displays that no vouchers exist.
dataset/ETHPy150Open tomwilkie/awesomation/src/appengine/auth_tests.py/AuthTests.testEndpointsReturn401--crossover with--dataset/ETHPy150Open diefenbach/django-lfs/lfs/manage/voucher/views.py/no_vouchers