

def test_get_table(self):
    table = self.schema.get_table(MAIN_TABLE)
    self.assertEqual(table.path, MAIN_TABLE)
    table = self.schema.get_table([PathNode(name='data', is_repeat=False), PathNode(name='repeat', is_repeat=True)])
    self.assertEqual(table.path, [PathNode(name='data', is_repeat=False), PathNode(name='repeat', is_repeat=True)])
    table = self.schema.get_table([PathNode(name='data', is_repeat=False), PathNode(name='DoesNotExist', is_repeat=False)])
    self.assertIsNone(table)

dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/export/tests/test_export_instance.py TestExportInstance.test_get_table/original