tests.py¶
This module contains tests which can be performed by a manager. Since the manager has access to all add/edit/remove user functionality these functions are all tested here.
Class definitions:
-
class
apps.healthperson.management.tests.ManagementTest(methodName='runTest')[source]¶ Bases:
core.unittest.baseunittest.BaseUnitTestProvides the tests performed by a logged in manager
-
check_search(url, post_data, context_key, full_name)[source]¶ Check the default search page for different search criteria
- Args:
- url: the url to open
- post_data: the data to post to that url
- context_key: the key to look voor in the context after posting
- full_name: the full_name of the user that should be found
- Returns:
- The response after posting the data
-
check_healthperson_pages(base_url, view_edit_pages)[source]¶ Check edit pages for different user types, try to post with default values that are retrieved with a ‘get’ request.
- Args:
- base_url: the base_url to build up the url to call
- view_edit_pages: a list of parts of urls to use to get the view and post the edit page.
-
check_secretary_pages(secretary)[source]¶ Check the pages accessible by a manager for a secretary
- Args:
- secretary: the secretary to check the pages for
-
check_healthprofessional_pages(healthprofessional)[source]¶ Check the pages accessible by a manager for a healthprofessional
- Args:
- healthprofessional: the healthprofessional to check the pages for
-