Example #1
0
 def test_get_peer_host(self):
     """Validates caller host (from X-Host-Token) is stored in auth context."""
     tok = host_token.create_host_token('host-name.domain')
     self.call('127.0.0.1',
               '*****@*****.**',
               headers={'X-Host-Token-V1': tok})
     self.assertEqual('host-name.domain', api.get_peer_host())
Example #2
0
 def get(self):
     self.response.write(api.get_peer_host() or '<none>')
Example #3
0
 def get(self):
   self.response.write(api.get_peer_host() or '<none>')
 def test_get_peer_host(self):
   """Validates caller host (from X-Host-Token) is stored in auth context."""
   tok = host_token.create_host_token('host-name.domain')
   self.call('127.0.0.1', '*****@*****.**', headers={'X-Host-Token-V1': tok})
   self.assertEqual('host-name.domain', api.get_peer_host())