'Dots are special in MongoDB, check that they work in rows/indexes.'

def testDotsInDirectory(self):

    for directory in ['aff4:/C.1240/dir', 'aff4:/C.1240/dir/a.b', 'aff4:/C.1240/dir/a.b/c', 'aff4:/C.1240/dir/b']:
        aff4.FACTORY.Create(directory, standard.VFSDirectory, token=self.token).Close()
    data_store.DB.Flush()
    aff4.FACTORY.Open('aff4:/C.1240/dir/a.b/c', standard.VFSDirectory, token=self.token)
    index = data_store.DB.ResolvePrefix('aff4:/C.1240/dir', 'index:dir/', token=self.token)
    subjects = [s for (s, _, _) in index]
    self.assertTrue(('index:dir/b' in subjects))
    self.assertTrue(('index:dir/a.b' in subjects))
    directory = aff4.FACTORY.Open('aff4:/C.1240/dir', token=self.token)
    self.assertEqual(2, len(list(directory.OpenChildren())))
    self.assertEqual(2, len(list(directory.ListChildren())))
