Tests are written and executed using Pytest.

Running Tests

  1. Enter nix shell in the project root folder to open a shell which is your test environment:
cd ekklesia-portal
  1. Compile translations:
ipython makebabel.ipy compile
  1. Create a config file named testconfig.yml using the config template from tests/testconfig.example.yml Make sure that the database connection string points to an empty + writable database.
  2. Initialize the test database:
python tests/create_test_db.py -c testconfig.yml
  1. The tests can be run with pytest from the repository root directory.