def test_without_export_dir(self):
        """
        Test that when there is no export directory in the config, the repo working directory is used
        """
        # Setup
        config = PluginCallConfiguration({}, self.repo_config)

        # Test
        result = export_utils.retrieve_repo_config(self.repo, config)
        result_working_dir, result_date_filter = result
        self.assertEqual(result_working_dir, os.path.join(self.repo.working_dir, 'relative/path'))
        self.assertEqual({}, result_date_filter)
        export_utils.get_repo_relative_url.assert_called_once_with(self.repo.id)
        export_utils.create_date_range_filter.assert_called_once_with(config)
    def test_with_export_dir(self):
        """
        Test that when an export directory is in the configuration, it is used as the working directory
        """
        # Setup
        self.repo_config[constants.EXPORT_DIRECTORY_KEYWORD] = '/some/export/dir'
        expected_working_dir = '/some/export/dir/relative/path'
        config = PluginCallConfiguration({}, self.repo_config)

        # Test
        result = export_utils.retrieve_repo_config(self.repo, config)
        result_working_dir, result_date_filter = result
        self.assertEqual(result_working_dir, expected_working_dir)
        self.assertEqual({}, result_date_filter)
        export_utils.get_repo_relative_url.assert_called_once_with(self.repo.id)
        export_utils.create_date_range_filter.assert_called_once_with(config)