def METHOD_NAME(self):
    """
    Test CSV export with nested repeats
    """
    path = os.path.join(self.fixture_dir, 'double_repeat.xlsx')
    self._publish_xls_file(path)
    self.xform = XForm.objects.get(id_string='double_repeat')
    path = os.path.join(self.fixture_dir, 'instance.xml')
    self._make_submission(
        path, forced_submission_time=self._submission_time)
    self.maxDiff = None
    data_dictionary = DataDictionary.objects.all()[0]
    xpaths = [
        u'/data/bed_net[1]/member[1]/name',
        u'/data/bed_net[1]/member[2]/name',
        u'/data/bed_net[2]/member[1]/name',
        u'/data/bed_net[2]/member[2]/name',
        u'/data/meta/instanceID'
    ]
    self.assertEqual(data_dictionary.xpaths(repeat_iterations=2), xpaths)
    # test csv
    export = generate_export(
        Export.CSV_EXPORT,
        self.xform,
        None,
        self.options)
    storage = get_storage_class()()
    self.assertTrue(storage.exists(export.filepath))
    path, ext = os.path.splitext(export.filename)
    self.assertEqual(ext, '.csv')
    test_file_path = os.path.join(self.fixture_dir, 'export.csv')
    with storage.open(export.filepath, 'r') as csv_file:
        self._test_csv_files(csv_file, test_file_path)