tree: 619948a848722b1952cef4657b66c5d1658939bf [path history] [tgz]
  1. 01-index-crud-test.py
  2. 02-basic-find-test.py
  3. 03-operator-test.py
  4. 04-key-tests.py
  5. 05-index-selection-test.py
  6. 06-basic-text-test.py
  7. 06-text-default-field-test.py
  8. 07-text-custom-field-list-test.py
  9. 08-text-limit-test.py
  10. 09-text-sort-test.py
  11. 10-disable-array-length-field-test.py
  12. 11-ignore-design-docs-test.py
  13. 12-use-correct-index-test.py
  14. 13-stable-update-test.py
  15. 13-users-db-find-test.py
  16. 14-json-pagination-test.py
  17. 15-execution-stats-test.py
  18. 16-index-selectors-test.py
  19. 17-multi-type-value-test.py
  20. friend_docs.py
  21. limit_docs.py
  22. mango.py
  23. README.md
  24. user_docs.py
src/mango/test/README.md

Mango Tests

CouchDB should be started with ./dev/run -a testuser:testpass.

To run these, do this in the Mango top level directory:

$ virtualenv venv
$ source venv/bin/activate
$ make pip-install
$ make test

To run an individual test suite: nosetests --nocapture test/12-use-correct-index.py

To run the tests with text index support: MANGO_TEXT_INDEXES=1 nosetests --nocapture test

Test configuration

The following environment variables can be used to configure the test fixtures:

  • COUCH_HOST - root url (including port) of the CouchDB instance to run the tests against. Default is "http://127.0.0.1:15984".
  • COUCH_USER - CouchDB username (with admin premissions). Default is "testuser".
  • COUCH_PASSWORD - CouchDB password. Default is "testpass".
  • COUCH_AUTH_HEADER - Optional Authorization header value. If specified, this is used instead of basic authentication with the username/password variables above.
  • MANGO_TEXT_INDEXES - Set to "1" to run the tests only applicable to text indexes.