Esempio n. 1
0
 def test_ephemeral_ports_bad2(self):
     with self.assertRaises(ValueError) as ctx:
         _validate_ports_low_level("not even a list")
     self.assertIn(
         "'ports' must be a list of strings",
         str(ctx.exception),
     )
Esempio n. 2
0
 def test_ephemeral_ports_bad2(self):
     with self.assertRaises(ValueError) as ctx:
         _validate_ports_low_level("not even a list")
     self.assertIn(
         "'ports' must be a list of strings",
         str(ctx.exception),
     )
Esempio n. 3
0
 def test_ephemeral_ports_not_strings(self):
     with self.assertRaises(ValueError) as ctx:
         _validate_ports_low_level([(80, "127.0.0.1:80")])
     self.assertIn(
         "'ports' must be a list of strings",
         str(ctx.exception)
     )
Esempio n. 4
0
 def test_ephemeral_ports_not_strings(self):
     with self.assertRaises(ValueError) as ctx:
         _validate_ports_low_level([(80, "127.0.0.1:80")])
     self.assertIn(
         "'ports' must be a list of strings",
         str(ctx.exception)
     )