/REST-test

test for Python Rest server

Primary LanguageHTML

REST-test Build Status Coverage Status

test for Python Rest server

Environments variables to set

You can generate your API key at <your_discourse_url>/admin/users/8/<username>

  • DISCOURSE_BASE_URL : Base URL of your instance of Discourse
  • DISCOURSE_API_KEY : API key generated by Discourse
  • DISCOUSE_USERNAME : The username you've registered your API key under

Configuration files :

  • runtime.txt and Procfile : Both files are used by Heroku
  • .travis.yml is used by Travis CI
  • .coverage is the reports sent to Coveralls for coverage analysis

problems for now :

can't make pytest pass in CLI because of a import error. pytest command is : py.test test/ --doctest-modules -v --cov application --cov-report term-missing

  • Httmock is in the requirements and has been imported by PyCharm. Corrected. Solution was to pip install the requirements.
  • New problem is that the tested code isn't found by pytest. Corrected. Bad imports and I forgot to use virtualenv