Open KarenJewell opened 2 years ago
To expand further:
Currently this script gets the JSON output from the URLs listed in sources.csv and stores these as mock API data for future tests.
It does this so pytest doesn't ever need to call the real URL to get data (as that data changes all the time and we need static tests). (There were some changes made to the API scrapers to accommodate this shim/mock redirection for testing)
The script then also generates the API scrapers CSV files from the mocked JSON output above. This is done to create a expected result for future tests.
When the script is run it deletes all existing mock data (JSON & CSV output) and regenerates them.
It is the intention that this script is run infrequently when either:
Make the following possible with use of terminal flags etc. when calling the script.
Seems like there is still a newline character issue that needs resolved here too.🪲
It's got something to do with how git automatically switches line endings behind the scenes. But it's messing up the mock CSV files on Windows now.
See conversation in context: #151
from @gavbarnett
and from me (granted, may or may not be related):