Ejemplo n.º 1
0
 def test_invalid_header_value_type(self):
     with self.assertRaises(NotImplementedError):
         request("GET", "/",
                 callback=lambda: None,
                 headers={"foo": None})
Ejemplo n.º 2
0
 def test_invalid_empty_hostname(self):
     with self.assertRaisesRegexp(
             NotImplementedError, re.compile("No hostname.*")):
         request("GET", "http://")
Ejemplo n.º 3
0
 def test_invalid_errback_type(self):
     with self.assertRaises(AssertionError):
         request("GET", "http://localhost/", errback="")
Ejemplo n.º 4
0
 def test_invalid_empty_path(self):
     with self.assertRaisesRegexp(
             NotImplementedError, re.compile("No path.*")):
         request("GET", "http://localhost")