Exemple #1
0
 def test_validate_origin_on_http_port_range_high(self):
     namespace = mock.MagicMock()
     origin = mock.MagicMock()
     origin.http_port = 65537
     namespace.origins = [origin]
     with self.assertRaises(CLIError):
         validate_origin(namespace)
 def test_validate_origin_on_http_port_range_high(self):
     namespace = mock.MagicMock()
     origin = mock.MagicMock()
     origin.http_port = 65537
     namespace.origins = [origin]
     with self.assertRaises(CLIError):
         validate_origin(namespace)
Exemple #3
0
 def test_validate_raise_on_https_port_range_low(self):
     namespace = mock.MagicMock()
     origin = mock.MagicMock()
     origin.http_port = 80
     origin.https_port = -443
     namespace.origins = [origin]
     with self.assertRaises(CLIError):
         validate_origin(namespace)
 def test_validate_raise_on_https_port_range_low(self):
     namespace = mock.MagicMock()
     origin = mock.MagicMock()
     origin.http_port = 80
     origin.https_port = -443
     namespace.origins = [origin]
     with self.assertRaises(CLIError):
         validate_origin(namespace)
Exemple #5
0
 def test_validate_origin_passes_on_empty(self):
     namespace = mock.MagicMock()
     self.assertEqual(validate_origin(namespace), True)
 def test_validate_origin_passes_on_empty(self):
     namespace = mock.MagicMock()
     self.assertEqual(validate_origin(namespace), True)