Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to configure additional Scrapy settings when using savefixture command #194

Open
VMRuiz opened this issue Apr 5, 2024 · 0 comments

Comments

@VMRuiz
Copy link
Contributor

VMRuiz commented Apr 5, 2024

During the execution of savefixture command there are several Scrapy settings configure ad-hoc to be able to generate the tests:

self.settings["DOWNLOADER_MIDDLEWARES"][
"scrapy_poet.InjectionMiddleware"
] = None
self.settings["DOWNLOADER_MIDDLEWARES"][
"scrapy_poet.downloadermiddlewares.InjectionMiddleware"
] = None
self.settings["DOWNLOADER_MIDDLEWARES"][InjectionMiddleware] = None
self.settings["DOWNLOADER_MIDDLEWARES"][SavingInjectionMiddleware] = 543
self.settings["_SCRAPY_POET_SAVEFIXTURE"] = True

It would be great if we could pass additional ones, for example, to configure ZAPI without the need for an underlying Scrapy project. Such configuration could be defined in pyproject.toml or passed ass cli args.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant