def test_parse_address_old_format(self): # Test old format argv = "127.0.0.1:6200R127.0.0.1:6200/sda1_some meta data" ip, port, rest = parse_address(argv) self.assertEqual(ip, '127.0.0.1') self.assertEqual(port, 6200) self.assertEqual(rest, 'R127.0.0.1:6200/sda1_some meta data')
def test_parse_address_old_format(self): # Test old format argv = "127.0.0.1:6000R127.0.0.1:6000/sda1_some meta data" ip, port, rest = parse_address(argv) self.assertEqual(ip, '127.0.0.1') self.assertEqual(port, 6000) self.assertEqual(rest, 'R127.0.0.1:6000/sda1_some meta data')