jupyter / nbviewer

nbconvert as a web service: Render Jupyter Notebooks as static web pages
https://nbviewer.jupyter.org
Other
2.22k stars 551 forks source link

Test using tornado.testing #423

Open rgbkrk opened 9 years ago

rgbkrk commented 9 years ago

In our current testing setup, we're doing functional tests with no way to do mocks against GitHub itself. This ends up causing a lot of bad builds when things are actually fine. Since things can time out between requests and nbviewer, I this there's a mismatch.

Using tornado.testing should help do tests properly for nbviewer.

bollwyvl commented 9 years ago

I like the look of mock-server for mocking a REST endpoint (or whatever, I guess).

We then just generate a serialized dump of our current tests, (maybe make that repeatable) and store it right along with the tests.

bollwyvl commented 9 years ago

had a look through mock-server... didn't look very maintained. github3.py, as was mentioned, rolled (several) of their own. This seems like something that could stand alone eventually, but either bringing github3.py in and using it directly, or cargo-culting could work.

rgbkrk commented 9 years ago

The major issue is that we can't bring in github3.py in directly since we need async futures instead of blocking network calls. (if you're talking client)

If you're talking bringing in the mocks from github3.py to test against, that's another thing.