nteract / bookstore

📚 Notebook storage and publishing workflows for the masses
https://bookstore.readthedocs.io
BSD 3-Clause "New" or "Revised" License
202 stars 23 forks source link

Clone GET Testing #102

Closed mpacer closed 5 years ago

mpacer commented 5 years ago

This adds testing functionality and mocking for the clone handler's GET methods.

This mostly was focused on figuring out how to mock up most of what we need to test the handler without actually requiring a running server.

This also factors out the parameterization for the template so that we can test that separately.

To get the POST tested will require adding moto (to mock up s3 and interactions with aiobotocore).

Many thanks to @mseal for help getting the initial framework up and running.

willingc commented 5 years ago

Great job @mpacer. Thanks to @MSeal for getting the mock started. I'm going to merge. I'll do a quick follow up PR with a couple of docstrings and correct whatever black was whining about.

One step closer to release :tada:

MSeal commented 5 years ago

Nice, well done with making easy to read tests!