Source code for apps.healthperson.secretariat.tests

# -*- coding: utf-8 -*-
"""
Definitions for tests for secretary.
Currently only includes tests for checking the search page

:subtitle:`Class definitions:`
"""
from core.unittest.baseunittest import BaseUnitTest
from apps.healthperson.patient.models import Patient


[docs]class SecretaryTest(BaseUnitTest): """ Test the search function on the homepage """ fixtures = ['test_data/test_users.json']
[docs] def test_secretary_functions(self): """ Run the checks for a secretary .. Note:: testing adding/editing appointments is\ included into the appointments app """ self.login('jim@example.com') # Make patient.user BSN unique user = Patient.objects.all()[0].user user.BSN = '1234567894' user.changed_by_user = user user.save() # Do checks self.check_search()