City-Bureau / city-scrapers

Scrape, standardize and share public meetings from local government websites
https://cityscrapers.org
MIT License
332 stars 310 forks source link

#905 Chicago Special Service Area #4 95th Street #941

Closed jordan-zilch closed 4 years ago

jordan-zilch commented 4 years ago

Summary

Issue: #905

Checklist

All checks are run in GitHub Actions. You'll be able to see the results of the checks at the bottom of the pull request page after it's been opened, and you can click on any of the specific checks listed to see the output of each step and debug failures.

Questions

From the way I had to implement my spider, I'm unsure how to test it with the given pytest template. (GETs on the target URL produce strange results - there's no way to get all of the meeting data with GETs, you have to POST a specific URL on the website to get all the meeting data) Given that, I think the best way to test it would be to simply run scrapy crawl chi_ssa_4 (as in, a crawl on the real website and not a file response) and do checks on the items it returns. I started working on that (at the top of tests/test_chi_ssa_4.py) but I feel like I'm going about it the wrong way. Scrapy contracts might be a good way to go about this but I don't know if they play well with pytest. If we find a way to mock the POST responses that would also make it testable. Does anyone have any suggestions on how to move forward with testing this?

pjsier commented 4 years ago

Closing since this hasn't been active in a while, but feel free to reopen!