'Test Hdfs urlsplit'

def test_urlsplit(self):

    url = 'hdfs://nn.no.port/foo/bar'
    assert_equals(('hdfs', 'nn.no.port', '/foo/bar', '', ''), Hdfs.urlsplit(url))
    url = 'hdfs://nn:8020/foo/bar'
    assert_equals(('hdfs', 'nn:8020', '/foo/bar', '', ''), Hdfs.urlsplit(url))
    url = 'hdfs://nn:8020//foo//bar'
    assert_equals(('hdfs', 'nn:8020', '/foo/bar', '', ''), Hdfs.urlsplit(url))
    url = 'hdfs://nn:8020'
    assert_equals(('hdfs', 'nn:8020', '/', '', ''), Hdfs.urlsplit(url))
    url = '/foo/bar'
    assert_equals(('hdfs', '', '/foo/bar', '', ''), Hdfs.urlsplit(url))
    url = 'foo//bar'
    assert_equals(('hdfs', '', 'foo/bar', '', ''), Hdfs.urlsplit(url))
