예제 #1
0
    def test_address(self):
        """
        Ensure that is basically works
        """
        host, port = config.parse_address('foo:1234')

        self.assertEqual(host, 'foo')
        self.assertEqual(port, 1234)
예제 #2
0
 def test_port_is_not_int(self):
     with self.assertRaises(ValueError):
         config.parse_address('foo:bar')
예제 #3
0
    def test_no_port(self):
        host, port = config.parse_address('foo')

        self.assertEqual(host, 'foo')
        self.assertIsNone(port)