fpiweb.tests package¶
Submodules¶
fpiweb.tests.AddPermissionData module¶
-
fpiweb.tests.AddPermissionData.
iterate_permissions
(permissions)[source]¶ Generator to pick up the needed foreign keys for a given permisison.
- Parameters
permissions – attributes associated with this permission
- Returns
fpiweb.tests.rework_func_ManualBoxManagement module¶
-
class
fpiweb.tests.rework_func_ManualBoxManagement.
ManualBoxManagement
(methodName='runTest')[source]¶ Bases:
django.contrib.staticfiles.testing.StaticLiveServerTestCase
-
HEADLESS_MODE
= True¶
-
RECORD
= False¶
-
fixtures
= ['BoxType.json', 'LocBin.json', 'LocRow.json', 'LocTier.json', 'Location.json', 'ProductCategory.json', 'Product.json', 'Box.json', 'Pallet.json', 'PalletBox.json', 'Constraints.json']¶
-
classmethod
setUpClass
()[source]¶ Hook method for setting up class fixture before running tests in the class.
-
classmethod
tearDownClass
()[source]¶ Hook method for deconstructing the class fixture after running all tests in the class.
-
test_user
= ''¶
-
fpiweb.tests.rework_func_ManualPalletManagement module¶
-
class
fpiweb.tests.rework_func_ManualPalletManagement.
ManualPalletMaintenance
(methodName='runTest')[source]¶ Bases:
django.contrib.staticfiles.testing.StaticLiveServerTestCase
-
HEADLESS_MODE
= True¶
-
RECORD
= False¶
-
START_LOCATION
= True¶
-
fixtures
= ['BoxType.json', 'LocBin.json', 'LocRow.json', 'LocTier.json', 'Location.json', 'ProductCategory.json', 'Product.json', 'Box.json', 'Pallet.json', 'PalletBox.json', 'Constraints.json']¶
-
classmethod
setUpClass
()[source]¶ Hook method for setting up class fixture before running tests in the class.
-
classmethod
tearDownClass
()[source]¶ Hook method for deconstructing the class fixture after running all tests in the class.
-
test_user
= ''¶
-
fpiweb.tests.rework_func_UserManagement module¶
-
class
fpiweb.tests.rework_func_UserManagement.
UserManagementTest
(methodName='runTest')[source]¶ Bases:
django.contrib.staticfiles.testing.StaticLiveServerTestCase
-
HEADLESS_MODE
= True¶
-
RECORD
= True¶
-
fixtures
= ['Activity.json', 'Constraints.json', 'Group.json', 'PalletBox.json', 'BoxType.json', 'Location.json', 'LocBin.json', 'LocRow.json', 'LocTier.json', 'ProductExample.json', 'Product.json', 'ProductCategory.json', 'Box.json', 'Pallet.json']¶
-
classmethod
setUpClass
()[source]¶ Hook method for setting up class fixture before running tests in the class.
-
fpiweb.tests.test_forms module¶
-
class
fpiweb.tests.test_forms.
BoxItemFormTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
Test adding boxes to the pallet form.
-
fixtures
= ('BoxType', 'Product', 'ProductCategory', 'Constraints')¶
-
-
class
fpiweb.tests.test_forms.
BuildPalletFormTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
Test the form for building a pallet of boxes.
-
class
fpiweb.tests.test_forms.
ConfirmMergeFormTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
-
fixtures
= ('Location', 'LocBin', 'LocRow', 'LocTier')¶
-
-
class
fpiweb.tests.test_forms.
ExistingLocationFormTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
-
fixtures
= ('LocRow', 'LocBin', 'LocTier', 'Location')¶
-
-
class
fpiweb.tests.test_forms.
ExistingLocationWithBoxesFormTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
-
fixtures
= ('BoxType', 'LocRow', 'LocBin', 'LocTier', 'Location')¶
-
-
class
fpiweb.tests.test_forms.
LocationFormTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
-
fixtures
= ('LocRow', 'LocBin', 'LocTier')¶
-
fpiweb.tests.test_models module¶
fpiweb.tests.test_password_validation module¶
fpiweb.tests.test_setup module¶
test_setup.py - Activities required before testing can begin.
fpiweb.tests.test_support_box_and_activity module¶
test_support_box_and_activity.py - Test handling activity records.
-
class
fpiweb.tests.test_support_box_and_activity.
BoxSupportTestCase
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TransactionTestCase
test_support_activityClass - Test handling activity records.
-
fixtures
= ['Box', 'BoxType', 'Product', 'ProductCategory', 'LocRow', 'LocBin', 'LocTier', 'Location', 'Activity', 'Constraints']¶
-
test_pallet_finish
() → None[source]¶ Test loading and finishing off a pallet.
Build a new pallet, add some boxes to it, stash the pallet id, the pallet box ids, and the box ids associated with them. Then finish the pallet and make sure the pallet and all its pallet boxes have been deleted, while the boxes themselves have been preserved. Since we are going through the new and fill logic above, we are going to assume the activity records have been properly created.
- Returns
-
-
class
fpiweb.tests.test_support_box_and_activity.
PalletBoxInfo
(pallet_box_id: int, box_id: int, box_number: str, product: str, exp_year: int)[source]¶ Bases:
tuple
Holds an entry in the dictionary of pallet box info.
-
box_id
: int¶ Alias for field number 1
-
box_number
: str¶ Alias for field number 2
-
exp_year
: int¶ Alias for field number 4
-
pallet_box_id
: int¶ Alias for field number 0
-
product
: str¶ Alias for field number 3
-
fpiweb.tests.test_views module¶
-
class
fpiweb.tests.test_views.
AboutViewTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
-
class
fpiweb.tests.test_views.
BoxNewViewTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
-
fixtures
= ('Constraints', 'BoxType')¶
-
-
class
fpiweb.tests.test_views.
BuildPalletViewTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
-
fixtures
= ('Location', 'LocRow', 'LocBin', 'LocTier', 'Product', 'ProductCategory', 'BoxType', 'Constraints')¶
-
url
= '/fpiweb/build_pallet/'¶
-
-
class
fpiweb.tests.test_views.
IndexViewTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
-
class
fpiweb.tests.test_views.
LoginViewTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
-
class
fpiweb.tests.test_views.
LogoutViewTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
-
class
fpiweb.tests.test_views.
ManualMoveBoxViewTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
-
fixtures
= ('BoxType', 'ProductCategory', 'Product', 'LocRow', 'LocBin', 'LocTier', 'Location')¶
-
url
= '/fpiweb/manual_move_box/'¶
-
-
class
fpiweb.tests.test_views.
ManualPalletMoveViewTest
(methodName='runTest')[source]¶ Bases:
django.test.testcases.TestCase
-
fixtures
= ('BoxType', 'Constraints', 'Location', 'LocBin', 'LocRow', 'LocTier', 'Product', 'ProductCategory')¶
-
url
= '/fpiweb/manual_pallet_move/'¶
-
fpiweb.tests.utility module¶
-
fpiweb.tests.utility.
create_user
(*, username: str, first_name: str = 'first', last_name: str = 'last', title: str = 'title', password: str = 'abc123', access: fpiweb.constants.AccessLevel = <AccessLevel.Volunteer: 10>)[source]¶