apis_core.generic.tests.test_generic#

Module Contents#

Classes#

Data#

API#

apis_core.generic.tests.test_generic.fake = 'Faker(...)'#
apis_core.generic.tests.test_generic.routes = [('/generic_tests.person/', 'view_person', 200), ('/generic_tests.person/1', 'view_person', 200), ('...#
apis_core.generic.tests.test_generic.route_parameters = 'route,permission,status_code'#
apis_core.generic.tests.test_generic.unique_first_name = 'SomeUniqueFirstName'#
apis_core.generic.tests.test_generic.unique_last_name = 'SomeUniqueLastName'#
class apis_core.generic.tests.test_generic.TestGeneric#

Bases: object

setup()#
test_person_count(setup)#

Check if the correct number of persons was created

test_anon_person_views(setup, route, permission, status_code, client)#

Anon user should not be able to access the person views

test_admin_person_views(setup, route, permission, status_code, admin_client)#

Admin user should be able to access the person list

test_person_user_views(setup, route, permission, status_code, client)#

Normal user should not be able to access the person list

test_person_user_with_access(setup, route, permission, status_code, client)#

Normal user should be able to access the person views after bein granted permission

test_person_list(setup, admin_client)#

Check if the first_name of some person object is listed in the person list

test_person_detail(setup, admin_client)#

Check if the details page of a person lists its details

test_person_create(setup, admin_client)#

Check if we can create a person using the create route

test_person_delete(setup, admin_client)#

Check if we can delete a person using the delete route

test_person_delete_confirmation(setup, admin_client)#

Check if we can delete a person using the delete route

test_person_delete_redirect(setup, admin_client)#

Check if we can delete a person using the delete route

test_person_update(setup, admin_client)#

Check if we can update a person

test_person_autocomplete(setup, admin_client)#

Check if we find a person using autocomplete

test_person_table_export_filename(rf, admin_user)#

Check if the person table provides the correct export filename

test_dummy_table_export_filename(rf, admin_user)#

Check if the dummy table provides the correct export filename

test_dummy_table_class(admin_client)#
test_list_view_contains_columns(admin_client)#

Check if the columns selector is present & if some of the options are present