fobi.tests package¶
Submodules¶
fobi.tests.base module¶
-
class
fobi.tests.base.
BaseFobiBrowserBuldDynamicFormsTest
(methodName='runTest')[source]¶ Bases:
django.contrib.staticfiles.testing.StaticLiveServerTestCase
Browser tests django-fobi bulding forms functionality.
Backed up by selenium. This test is based on the bootstrap3 theme.
-
LIVE_SERVER_URL
= None¶
-
cleans_up_after_itself
= True¶
-
reset_sequences
= True¶
-
fobi.tests.constants module¶
fobi.tests.core module¶
fobi.tests.data module¶
fobi.tests.helpers module¶
-
fobi.tests.helpers.
create_form_with_entries
(user=None, create_entries_if_form_exist=True, data={}, is_public=False, name='Test form', slug='test-form')[source]¶ Create test form with entries.
Fills the form with pre-defined plugins.
Parameters: - user (django.contrib.auth.models.User) –
- create_entries_if_form_exist (bool) – If set to True, entries are being created even if form already exists (a database record).
- data (dict) –
- is_public (bool) –
- name (str) –
- slug (str) –
Return fobi.models.FormEntry: Instance of
fobi.models.FormEntry
with a number of form elements and handlers filled in.
-
fobi.tests.helpers.
db_clean_up
(clean_form=False, clean_elements=True, clean_handlers=True)[source]¶ Clean up the database.
Clean up the database by removing all form element and form handler entries.
-
fobi.tests.helpers.
get_or_create_admin_user
()[source]¶ Create a user for testing the fobi.
TODO: At the moment an admin account is being tested. Automated tests with diverse accounts are to be implemented.
-
fobi.tests.helpers.
get_or_create_admin_user
()[source] Create a user for testing the fobi.
TODO: At the moment an admin account is being tested. Automated tests with diverse accounts are to be implemented.
fobi.tests.test_browser_build_dynamic_forms module¶
-
class
fobi.tests.test_browser_build_dynamic_forms.
FobiBrowserBuldDynamicFormsTest
(methodName='runTest')[source]¶ Bases:
fobi.tests.base.BaseFobiBrowserBuldDynamicFormsTest
Browser tests django-fobi bulding forms functionality.
Backed up by selenium. This test is based on the bootstrap3 theme.
-
test_1001_open_dashboard
(*args, **kwargs)¶ Inner.
-
test_2001_add_form
(*args, **kwargs)¶ Inner.
-
test_2002_edit_form
(*args, **kwargs)¶ Inner.
-
test_2003_delete_form
(*args, **kwargs)¶ Inner.
-
test_2004_submit_form
(*args, **kwargs)¶ Inner.
-
test_3001_add_form_elements
(*args, **kwargs)¶ Inner.
-
test_3002_remove_form_elements
(*args, **kwargs)¶ Inner.
-
test_3003_edit_form_elements
(*args, **kwargs)¶ Inner.
-
test_4001_add_form_handlers
(*args, **kwargs)¶ Inner.
-
test_4002_remove_form_handlers
(*args, **kwargs)¶ Inner.
-
test_4003_edit_form_handlers
(*args, **kwargs)¶ Inner.
-
fobi.tests.test_core module¶
-
class
fobi.tests.test_core.
FobiCoreTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
Tests of django-fobi core functionality.
-
test_01_get_registered_form_element_plugins
(*args, **kwargs)¶ Inner.
-
test_02_get_registered_form_handler_plugins
(*args, **kwargs)¶ Inner.
-
test_03_get_registered_form_callbacks
(*args, **kwargs)¶ Inner.
-
test_04_get_registered_themes
(*args, **kwargs)¶ Inner.
-
test_05_action_url
(*args, **kwargs)¶ Inner.
-
test_06_form_entry_get_absolute_url
(*args, **kwargs)¶ Inner.
-
test_07_form_wizard_entry_get_absolute_url
(*args, **kwargs)¶ Inner.
-
test_08_form_entry_is_active
(*args, **kwargs)¶ Inner.
-
fobi.tests.test_drf_integration module¶
-
class
fobi.tests.test_drf_integration.
FobiDjangoRestFrameworkIntegrationTests
(methodName='runTest')[source]¶ Bases:
rest_framework.test.APITestCase
DRF integration tests.
-
test_04_fail_options_action_non_public_form
()[source]¶ Test OPTIONS action call fail test for non-public form.
-
test_06_options_action_non_public_form_auth_user
()[source]¶ Test OPTIONS action call for authorised user for non-public form.
-
test_07_put_action_non_public_form_auth_user
()[source]¶ Test PUT action call for authorised user for non-public form.
-
fobi.tests.test_dynamic_forms module¶
fobi.tests.test_feincms_integration module¶
-
class
fobi.tests.test_feincms_integration.
FeinCMSIntegrationTest
(methodName='runTest')[source]¶ Bases:
fobi.tests.base.BaseFobiBrowserBuldDynamicFormsTest
FeinCMS integration tests.
fobi.tests.test_form_importers_mailchimp module¶
fobi.tests.test_sortable_dict module¶
-
class
fobi.tests.test_sortable_dict.
FobiDataStructuresTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
Tests of django-fobi
data_structures
module functionality.-
test_01_sortable_dict_move_before_key
(*args, **kwargs)¶ Inner.
-
test_02_sortable_dict_move_after_key
(*args, **kwargs)¶ Inner.
-