示例#1
0
 def test_parses_port_and_path(self):
     self.assertEqual(url_from_arguments([8000, "/foo"]),
                      "http://localhost:8000/foo")
示例#2
0
 def test_fails_on_backwards_arguments(self):
     self.assertRaises(StandardError,
                       lambda: url_from_arguments(["/", 8000]))
示例#3
0
 def test_fails_on_single_argument(self):
     self.assertRaises(IndexError, lambda: url_from_arguments([8000]))
示例#4
0
 def test_fails_on_non_numeric_port(self):
     self.assertRaises(ValueError,
                       lambda: url_from_arguments(["foo", "/"]))