Testing

We use the Django test framework for unit tests and workflow tests. One of the many advantages of this framework is that the environment is reset to a fiducial state for each test to avoid hysteretic effects.

Workflows

To run a test workflow, first launch the CE in development mode:

$ bash docker/launch.sh dev up

Once online, open a terminal in the API server container:

$ docker exec -it ce-dev-api-server-1 bash

Run the tests using the Django manage.py test command syntax. To run a single module workflow, you can use a command like the one below:

ce@08a7d755568a:/opt/app$ python manage.py test \
                          calculation_engine.tests.test_workflows.WorkflowTests.test_crust_dft