Update testing.md file.
How to run Python tests for stub servers.
This commit is contained in:
@@ -165,6 +165,13 @@ or to get html report:
|
||||
|
||||
then browse reports/common/lib/xmodule/cover/index.html
|
||||
|
||||
To run tests for stub servers, for example for
|
||||
[YouTube stub server](https://github.com/edx/edx-platform/blob/master/common/djangoapps/terrain/stubs/tests/test_youtube_stub.py),
|
||||
you can do one of:
|
||||
|
||||
rake fasttest_cms[common/djangoapps/terrain/stubs/tests/test_youtube_stub.py]
|
||||
python -m coverage run --rcfile=cms/.coveragerc `which ./manage.py` cms --settings test test --traceback common/djangoapps/terrain/stubs/tests/test_youtube_stub.py
|
||||
|
||||
|
||||
Very handy: if you uncomment the `pdb=1` line in `setup.cfg`, it will drop you into pdb on error. This lets you go up and down the stack and see what the values of the variables are. Check out [the pdb documentation](http://docs.python.org/library/pdb.html)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user