コード例 #1
0
 def test_is_rsr_host(self):
     """Test request to normal RSR host."""
     self.assertFalse(_is_rsr_host(self.req_not_found_host.get_host()))
     self.assertFalse(_is_rsr_host(self.req_not_found_host2.get_host()))
     with self.assertRaises(DisallowedHost):
         _is_rsr_host(self.req_invalid_host.get_host())
     with self.assertRaises(DisallowedHost):
         _is_rsr_host(self.req_empty_host.get_host())
コード例 #2
0
 def test_is_rsr_host(self):
     """Test request to normal RSR host."""
     self.assertTrue(_is_rsr_host(self.req_RSR_DOMAIN.get_host()))
     self.assertTrue(_is_rsr_host(self.req_127.get_host()))
     self.assertTrue(_is_rsr_host(self.req_localhost.get_host()))
コード例 #3
0
 def test_is_rsr_host(self):
     """Make sure AKVOAPP domain is not a valid stock RSR host."""
     self.assertFalse(_is_rsr_host(settings.AKVOAPP_DOMAIN))