(Pyton 2.7.9, Debian Jessie)
README.md refers to some directory samples but it seems to be missing.
Examples in Sphinx documentation also do not provide complete usable application.
I had even problem to create a test suite which would collect at least one test case. For this purpose I took ramses-tech/ramses-example repository and added tests/test_api.py
import pytest
import ra
api = ra.api("example.raml", app="config:local.ini")
@api.resource("/users")
def users_resource(users):
@pytest.fixture
def two_hundred():
return 200
@users.get
def get(req, two_hundred):
response = req()
assert response.status_code == two_hundred
Running:
$ py.test -sv tests/test_api.py --collect-only
did not find any test case.
If I introduced some type into raml or ini file names, the py.test complained about missing files (so it was processed and this was expected behaviour).
Having rather good knowledge of pytest I was wondering, how can py.test collect anything, when there is not test_??? function and no ra plugin was listed by $ py.test --trace-config|grep " ra ". When I explicitly enabled the plugin by $ py.test -p ra --trace-config|grep " ra " detected it, but $ py.test -p ra tests/test_api.py --collect-only did not find any test case.
I am really desperate now how to start.