Convert test prompt to pytest

Convert `test_prompt.py` to `py.test`. 

I rebased this branch on top of #347 because `tox` fails otherwise. The named error occurs as a consequence of the test suite being run twice on master. (`py.test` struggles to `monkeypatch` a function twice within the same test session)

Looking forward to your feedback! :smile: