tests.unit package#

Submodules#

tests.unit.general_test_functions module#

tests.unit.general_test_functions.get_django_client_object(user)[source]#

return a valid client object for a user

tests.unit.general_test_functions.get_django_request_object(user: User) HttpRequest[source]#

return a valid request object for a user

tests.unit.general_test_functions.test_model_instance_is_safe(manager, model_instance, exclude_list=[])[source]#

Test bleach security on text and char fields. The save method of these fields should use Bleach to sanitise the data. We save it to see if this works.

Parameters:
  • manager – CobaltTestManagerIntegration

  • model_instance – An instance of a model to test

  • exclude_list – list of strings. Names of fields to exclude from the testing. We whitelist not blacklist

Module contents#