Warning |
---|
As of Totara 17 the recommender service (ml_recommender) is now deprecated. Please refer to the Machine Learning Service documentation to find out more about how Totara recommendations work. |
Totara has developed the algorithms of the Recommendation engine Recommender service in Python. Like the core Totara development, the Recommendation engine Recommender service is integrated with a testing framework to ensure that code can be tested for the expected responses.
This page provides detail on how to set up a test environment.
Test writing framework (unittest
)
The unit test framework in Python is called unittest
, which comes packaged with Python.
Test running framework (pytest
)
There are many test running frameworks available for Python. Totara has integrated the pytest
test test running framework for the Recommendation engineRecommender service. Python does not come with with pytest
preinstalled, therefore it must be installed in your development environment to run the test. This can be easily installed via the command line from PyPI using the following command:
...