'Test that the ListDirectory flow works on unicode directories.'

def testUnicodeListDirectory(self):

    client_mock = action_mocks.ListDirectoryClientMock()
    pb = rdf_paths.PathSpec(path=os.path.join(self.base_path, 'test_img.dd'), pathtype=rdf_paths.PathSpec.PathType.OS)
    pb.Append(path=u'\u5165\u4e61\u968f\u4fd7    \u6d77\u5916\u6625\u8282\u522b\u6837\u8fc7\u6cd5', pathtype=rdf_paths.PathSpec.PathType.TSK)
    for _ in flow_test_lib.TestFlowHelper(filesystem.ListDirectory.__name__, client_mock, client_id=self.client_id, pathspec=pb, token=self.token):
        pass
    output_path = self.client_id.Add('fs/tsk').Add(pb.CollapsePath())
    fd = aff4.FACTORY.Open(output_path, token=self.token)
    children = list(fd.OpenChildren())
    self.assertEqual(len(children), 1)
    child = children[0]
    self.assertEqual(os.path.basename(utils.SmartUnicode(child.urn)), u'\u5165\u4e61\u968f\u4fd7.txt')
