[10321] | 1 | waeup.cas |
---|
| 2 | ********* |
---|
| 3 | |
---|
| 4 | Install for Development |
---|
| 5 | ----------------------- |
---|
| 6 | |
---|
[10324] | 7 | Create a virtualenv and install basic packages:: |
---|
| 8 | |
---|
[10321] | 9 | $ virtualenv py27 |
---|
| 10 | $ source py27/bin/activate |
---|
| 11 | (py27)$ python setup.py dev |
---|
| 12 | |
---|
| 13 | Running Tests |
---|
| 14 | ------------- |
---|
| 15 | |
---|
[10324] | 16 | After `Install for Development`_ run:: |
---|
[10321] | 17 | |
---|
| 18 | (py27)$ py.test |
---|
| 19 | |
---|
[10324] | 20 | We also provide support for `tox`. You can run tests in Python 2.6, |
---|
[10418] | 21 | 2.7, 3.2, and 3.3 environments (if you have the respective Python |
---|
[10324] | 22 | versions installed locally) simply by:: |
---|
| 23 | |
---|
[10325] | 24 | (py27)$ pip install tox # needed only once per virtualenv |
---|
[10324] | 25 | (py27)$ tox |
---|
| 26 | |
---|
| 27 | If you want to run tests for a specific version only, try something |
---|
| 28 | like:: |
---|
| 29 | |
---|
[10418] | 30 | (py27)$ tox -e py32 |
---|
[10324] | 31 | |
---|
[10418] | 32 | to run tests for Python 3.2 only. |
---|
[10325] | 33 | |
---|
| 34 | Getting Test-Coverage Reports |
---|
| 35 | ----------------------------- |
---|
| 36 | |
---|
| 37 | You can generate coverage reports by:: |
---|
| 38 | |
---|
| 39 | (py27)$ py.test --cov |
---|
| 40 | |
---|
| 41 | This will dump reports on commandline. For HTML reports you can try:: |
---|
| 42 | |
---|
| 43 | (py27)$ py.test --cov --cov-report=html |
---|
| 44 | |
---|
| 45 | Please make sure, that coverage stays at 100%. |
---|
| 46 | |
---|
| 47 | |
---|
[10421] | 48 | Running the CAS Server (with `paster`) |
---|
| 49 | -------------------------------------- |
---|
| 50 | |
---|
| 51 | You need some WSGI-capable HTTP-server to run CAS. One approach would |
---|
| 52 | be the ``paster`` HTTP-server included in the ``PasteScript`` |
---|
| 53 | package:: |
---|
| 54 | |
---|
| 55 | (py27)$ pip install PasteScript |
---|
| 56 | |
---|
| 57 | This will provide the `paster` executable in path. Now you need a |
---|
| 58 | configuration file like the ``sample.ini`` file provided in the |
---|
| 59 | package root. You can run this configuration then like this:: |
---|
| 60 | |
---|
| 61 | (py27)$ paster serve sample.ini |
---|
| 62 | |
---|
| 63 | Afterwards you should be able to login on http://localhost:8008/login |
---|
| 64 | |
---|
| 65 | The authentication module enabled by default is ``dummy`` and mainly |
---|
| 66 | for testing. It gives a successful login for the credentials ``bird`` |
---|
| 67 | / ``bebop`` (and nothing else). |
---|