fobi.tests package

Submodules

fobi.tests.base module

fobi.tests.base.print_info(func)[source]

Prints some useful info.

fobi.tests.base.skip(func)[source]

Simply skips the test.

fobi.tests.base.is_fobi_setup_completed()[source]
fobi.tests.base.mark_fobi_setup_as_completed()[source]

fobi.tests.constants module

fobi.tests.data module

fobi.tests.helpers module

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.helpers.create_form_with_entries(user=None, create_entries_if_form_exist=True)[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).
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()[source]

Cleans up the database by removing all form element and form handler entries.

fobi.tests.test_browser_build_dynamic_forms module

class fobi.tests.test_browser_build_dynamic_forms.FobiBrowserBuldDynamicFormsTest(methodName='runTest')[source]

Bases: django.test.testcases.LiveServerTestCase

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
e = AttributeError("'Settings' object has no attribute 'LIVE_SERVER_URL'",)
classmethod setUpClass()[source]

Set up class.

tearDown()[source]

Tear down.

classmethod tearDownClass()[source]

Tear down class.

test_1001_open_dashboard(*args, **kwargs)
test_2001_add_form(*args, **kwargs)
test_2002_edit_form(*args, **kwargs)
test_2003_delete_form(*args, **kwargs)
test_2004_submit_form(*args, **kwargs)
test_3001_add_form_elements(*args, **kwargs)
test_3002_remove_form_elements(*args, **kwargs)
test_3003_edit_form_elements(*args, **kwargs)
test_4001_add_form_handlers(*args, **kwargs)
test_4002_remove_form_handlers(*args, **kwargs)
test_4003_edit_form_handlers(*args, **kwargs)

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.

setUp()[source]

Set up.

test_01_get_registered_form_element_plugins(*args, **kwargs)
test_02_get_registered_form_handler_plugins(*args, **kwargs)
test_03_get_registered_form_callbacks(*args, **kwargs)
test_04_get_registered_themes(*args, **kwargs)
test_05_action_url(*args, **kwargs)

fobi.tests.test_dynamic_forms module

class fobi.tests.test_dynamic_forms.FobiDynamicFormsTest(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

Tests of django-fob dynamic forms functionality.

setUp()[source]

Set up.

test_01_assemble_form_class_and_render_form(*args, **kwargs)

fobi.tests.test_form_importers_mailchimp module

fobi.tests.test_form_importers_mailchimp.do()[source]

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.

setUp()[source]

Set up.

test_01_sortable_dict_move_before_key(*args, **kwargs)
test_02_sortable_dict_move_after_key(*args, **kwargs)

Module contents