def assertStructure(self, root, dirDict):
        children = [x.basename() for x in root.children()]
        for x in dirDict:
            child = root.child(x)
            if isinstance(dirDict[x], dict):
                self.assertTrue(child.isdir(), "%s is not a dir!"
                                % (child.path,))
                self.assertStructure(child, dirDict[x])
            else:
                a = child.getContent().replace(os.linesep, '\n')
                self.assertEquals(a, dirDict[x], child.path)
            children.remove(x)
        if children:
            self.fail("There were extra children in %s: %s"
                      % (root.path, children))
Validates if a code is (still) a valid one. It takes two arguments:
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/python/test/test_release.py/StructureAssertingMixin.assertStructure--crossover with--dataset/ETHPy150Open joaoqalves/web2py-oauth2/modules/oauth/storage/__init__.py/MongoStorage.valid_code