Commit 55e3cc12 authored by Vincent Pelletier's avatar Vincent Pelletier

Move all get*Module to TestERP5BankingMixin.

Removes duplicates.
Also, remove irrelevant, stating-the-obvious docstrings.
parent 4855fd6b
......@@ -160,149 +160,152 @@ class TestERP5BankingMixin(ERP5TypeTestCase):
def getUserFolder(self):
"""
Return the user folder
"""
return getattr(self.getPortal(), 'acl_users', None)
def getPersonModule(self):
"""
Return the person module
"""
return getattr(self.getPortal(), 'person_module', None)
def getOrganisationModule(self):
"""
Return the organisation module
"""
return getattr(self.getPortal(), 'organisation_module', None)
def getCurrencyCashModule(self):
"""
Return the Currency Cash Module
"""
return getattr(self.getPortal(), 'currency_cash_module', None)
def getCashInventoryModule(self):
"""
Return the Cash Inventory Module
"""
return getattr(self.getPortal(), 'cash_inventory_module', None)
def getBankAccountInventoryModule(self):
"""
Return the Bank Account Inventory Module
"""
return getattr(self.getPortal(), 'bank_account_inventory_module', None)
def getCurrencyModule(self):
"""
Return the Currency Module
"""
return getattr(self.getPortal(), 'currency_module', None)
def getCategoryTool(self):
"""
Return the Category Tool
"""
return getattr(self.getPortal(), 'portal_categories', None)
def getWorkflowTool(self):
"""
Return the Worklfow Tool
"""
return getattr(self.getPortal(), 'portal_workflow', None)
def getSimulationTool(self):
"""
Return the Simulation Tool
"""
return getattr(self.getPortal(), 'portal_simulation', None)
def getCheckPaymentModule(self):
"""
Return the Check Payment Module
"""
return getattr(self.getPortal(), 'check_payment_module', None)
def getStopPaymentModule(self):
"""
Return the Stop Payment Module
"""
return getattr(self.getPortal(), 'stop_payment_module', None)
def getCheckDepositModule(self):
"""
Return the Check Deposit Module
"""
return getattr(self.getPortal(), 'check_deposit_module', None)
def getCheckbookModule(self):
"""
Return the Checkbook Module
"""
return getattr(self.getPortal(), 'checkbook_module', None)
def getCheckbookModelModule(self):
"""
Return the Checkbook Module
"""
return getattr(self.getPortal(), 'checkbook_model_module', None)
def getCheckbookReceptionModule(self):
"""
Return the Checkbook Reception Module
"""
return getattr(self.getPortal(), 'checkbook_reception_module', None)
def getCheckbookVaultTransferModule(self):
"""
Return the Checkbook Vault Transfer Module
"""
return getattr(self.getPortal(), 'checkbook_vault_transfer_module', None)
def getCheckbookUsualCashTransferModule(self):
"""
Return the Checkbook Delivery Module
"""
return getattr(self.getPortal(), 'checkbook_usual_cash_transfer_module', None)
def getCheckbookDeliveryModule(self):
"""
Return the Checkbook Vault Transfer Module
"""
return getattr(self.getPortal(), 'checkbook_delivery_module', None)
def getCheckbookMovementModule(self):
"""
Return the Checkbook Movement Module
"""
return getattr(self.getPortal(), 'checkbook_movement_module', None)
def getCheckModule(self):
"""
Return the Check Module
"""
return getattr(self.getPortal(), 'check_module', None)
def getAccountingDateModule(self):
"""
Return the Accounting Date Module
"""
return getattr(self.getPortal(), 'accounting_date_module', None)
def getCounterDateModule(self):
"""
Return the Counter Date Module
"""
return getattr(self.getPortal(), 'counter_date_module', None)
def getCounterModule(self):
"""
Return the Counter Date Module
"""
return getattr(self.getPortal(), 'counter_module', None)
def getCashMovementModule(self):
return getattr(self.getPortal(), 'cash_movement_new_not_emitted_module')
def getMonetaryReceptionModule(self):
return getattr(self.getPortal(), 'monetary_reception_module')
def getMonetaryIssueModule(self):
return getattr(self.getPortal(), 'monetary_issue_module', None)
def getAccountingCancellationModule(self):
return getattr(self.getPortal(), 'accounting_cancellation_module', None)
def getCashBalanceRegulationModule(self):
return getattr(self.getPortal(), 'cash_balance_regulation_module', None)
def getCashSortingModule(self):
return getattr(self.getPortal(), 'cash_sorting_module', None)
def getCashExchangeModule(self):
return getattr(self.getPortal(), 'cash_exchange_module', None)
def getCashToCurrencyPurchaseModule(self):
return getattr(self.getPortal(), 'cash_to_currency_purchase_module', None)
def getClassificationSurveyModule(self):
return getattr(self.getPortal(), 'classification_survey_module', None)
def getCounterRenderingModule(self):
return getattr(self.getPortal(), 'counter_rendering_module', None)
def getDestructionSurveyModule(self):
return getattr(self.getPortal(), 'destruction_survey_module', None)
def getForeignCashReceptionModule(self):
return getattr(self.getPortal(), 'foreign_cash_reception_module', None)
def getInternalMoneyDepositModule(self):
return getattr(self.getPortal(), 'internal_money_deposit_module', None)
def getInternalMoneyPaymentModule(self):
return getattr(self.getPortal(), 'internal_money_payment_module', None)
def getMonetaryDestructionModule(self):
return getattr(self.getPortal(), 'monetary_destruction_module', None)
def getMonetaryRecallModule(self):
return getattr(self.getPortal(), 'monetary_recall_module', None)
def getMonetarySurveyModule(self):
return getattr(self.getPortal(), 'monetary_survey_module', None)
def getMoneyDepositModule(self):
return getattr(self.getPortal(), 'money_deposit_module', None)
def getMoneyDepositRenderingModule(self):
return getattr(self.getPortal(), 'money_deposit_rendering_module', None)
def getMutilatedBanknoteModule(self):
return getattr(self.getPortal(), 'mutilated_banknote_module', None)
def getTravelerCheckPurchaseModule(self):
return getattr(self.getPortal(), 'traveler_check_purchase_module', None)
def getTravelerCheckSaleModule(self):
return getattr(self.getPortal(), 'traveler_check_sale_module', None)
def getUsualCashRenderingModule(self):
return getattr(self.getPortal(), 'usual_cash_rendering_module', None)
def getUsualCashTransferModule(self):
return getattr(self.getPortal(), 'usual_cash_transfer_module', None)
def getVaultTransferModule(self):
return getattr(self.getPortal(), 'vault_transfer_module', None)
def createCurrency(self, currency_list=(('EUR', 'Euro', 1/652., 1/650., 'USD'), ('USD', 'USD', 652, 650., 'EUR')), only_currency=False):
# create the currency document for euro inside the currency module
#currency_list = (('EUR', 'Euro', 1/650., 'USD'), ('USD', 'Dollar', 650., 'EUR'))
......
......@@ -48,14 +48,6 @@ class TestERP5BankingAccountingCancellation(TestERP5BankingMixin):
RUN_ALL_TEST = 1 # we want to run all test
QUIET = 0 # we don't want the test to be quiet
def getAccountingCancellationModule(self):
"""
Return the Check Payment Module
"""
return getattr(self.getPortal(), 'accounting_cancellation_module', None)
def getTitle(self):
"""
Return the title of the test
......
......@@ -43,9 +43,6 @@ class TestERP5BankingAccountingDate(TestERP5BankingMixin):
def getTitle(self):
return "ERP5BankingAccountingDate"
def getAccountingDateModule(self):
return getattr(self.getPortal(), 'accounting_date_module')
def getBaobab_checkAccountingDateOpen(self):
return getattr(self.getPortal(), 'Baobab_checkAccountingDateOpen')
......
......@@ -73,13 +73,6 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin):
"""
return "ERP5BankingCashBalanceRegulation"
def getCashBalanceRegulationModule(self):
"""
Return the Cash Balance Regulation Module
"""
return getattr(self.getPortal(), 'cash_balance_regulation_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -52,13 +52,6 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin):
"""
return "ERP5BankingCashClassification"
def getCashSortingModule(self):
"""
Return the Cash Sorting Module
"""
return getattr(self.getPortal(), 'cash_sorting_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -74,13 +74,6 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin):
"""
return "ERP5BankingCashExchange"
def getCashExchangeModule(self):
"""
Return the Cash Exchange Module
"""
return getattr(self.getPortal(), 'cash_exchange_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -95,13 +95,6 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin):
"""
return "ERP5BankingCashMovement"
def getCashMovementModule(self):
"""
Return the Vault Transer Module
"""
return getattr(self.getPortal(), 'cash_movement_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -54,12 +54,6 @@ class TestERP5BankingCashMovementNewNotEmitted(TestERP5BankingMonetaryReceptionM
"""
return "ERP5BankingCashMovementNewNotEmitted"
def getCashMovementModule(self):
return getattr(self.getPortal(), 'cash_movement_new_not_emitted_module')
def getMonetaryReceptionModule(self):
return getattr(self.getPortal(), 'monetary_reception_module')
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -52,13 +52,6 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin):
"""
return "ERP5BankingCashSorting"
def getCashSortingModule(self):
"""
Return the Cash Sorting Module
"""
return getattr(self.getPortal(), 'cash_sorting_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -73,13 +73,6 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin):
"""
return "ERP5BankingCashToCurrencyPurchase"
def getCashToCurrencyPurchaseModule(self):
"""
Return the Cash To Currency Purchase Module
"""
return getattr(self.getPortal(), 'cash_to_currency_purchase_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -56,12 +56,6 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin):
"""
return "ERP5BankingCheckDeposit"
def getCheckDepositModule(self):
"""
Return the check deposit module
"""
return getattr(self.getPortal(), 'check_deposit_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -52,13 +52,6 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin):
"""
return "ERP5BankingClassificationSurvey"
def getClassificationSurveyModule(self):
"""
Return the Classification Survey Module
"""
return getattr(self.getPortal(), 'classification_survey_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -84,13 +84,6 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin):
"""
return "ERP5BankingCounterRendering"
def getCounterRenderingModule(self):
"""
Return the Cash Transer Module
"""
return getattr(self.getPortal(), 'counter_rendering_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -57,13 +57,6 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin):
"""
return "ERP5BankingDestructionSurvey"
def getDestructionSurveyModule(self):
"""
Return the Cash Transer Module
"""
return getattr(self.getPortal(), 'destruction_survey_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -62,13 +62,6 @@ class TestERP5BankingForeignCashReception(TestERP5BankingMixin):
"""
return "ERP5BankingForeignCashReception"
def getForeignCashReceptionModule(self):
"""
Return the Cash Inventory Module
"""
return getattr(self.getPortal(), 'foreign_cash_reception_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -52,13 +52,6 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin):
"""
return "ERP5BankingInternalMoneyDeposit"
def getInternalMoneyDepositModule(self):
"""
Return the Internal Money Deposit Module
"""
return getattr(self.getPortal(), 'internal_money_deposit_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -52,13 +52,6 @@ class TestERP5BankingInternalMoneyPayment(TestERP5BankingMixin):
"""
return "ERP5BankingInternalMoneyPayment"
def getInternalMoneyPaymentModule(self):
"""
Return the Internal Money Payment Module
"""
return getattr(self.getPortal(), 'internal_money_payment_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -85,13 +85,6 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin):
"""
return "ERP5BankingMonetaryDestruction"
def getMonetaryDestructionModule(self):
"""
Return the Monetary Destruction Module
"""
return getattr(self.getPortal(), 'monetary_destruction_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -122,20 +122,6 @@ class TestERP5BankingMonetaryIssue(TestERP5BankingMonetaryReceptionMixin):
"""
return "ERP5BankingMonetaryIssue"
def getMonetaryIssueModule(self):
"""
Return the Cash Inventory Module
"""
return getattr(self.getPortal(), 'monetary_issue_module', None)
def getMonetaryReceptionModule(self):
"""
Return the Cash Inventory Module
"""
return getattr(self.getPortal(), 'monetary_reception_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -84,13 +84,6 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin):
"""
return "ERP5BankingMonetaryRecall"
def getMonetaryRecallModule(self):
"""
Return the Monetary Recall Module
"""
return getattr(self.getPortal(), 'monetary_recall_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -60,13 +60,6 @@ class TestERP5BankingMonetaryReception(TestERP5BankingMixin):
"""
return "ERP5BankingMonetaryReception"
def getMonetaryReceptionModule(self):
"""
Return the Cash Inventory Module
"""
return getattr(self.getPortal(), 'monetary_reception_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -54,13 +54,6 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin):
"""
return "ERP5BankingMonetarySurvey"
def getMonetarySurveyModule(self):
"""
Return the Cash Transer Module
"""
return getattr(self.getPortal(), 'monetary_survey_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -55,13 +55,6 @@ class TestERP5BankingMoneyDepositMixin(TestERP5BankingMixin):
Return the title of the test
"""
return "ERP5BankingMoneyDeposit"
def getMoneyDepositModule(self):
"""
Return the Money Deposit Module
"""
return getattr(self.getPortal(), 'money_deposit_module', None)
def afterSetUp(self):
"""
......
......@@ -84,13 +84,6 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin):
"""
return "ERP5BankingMoneyDepositRendering"
def getMoneyDepositRenderingModule(self):
"""
Return the Cash Transer Module
"""
return getattr(self.getPortal(), 'money_deposit_rendering_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -53,12 +53,6 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin):
"""
return "ERP5BankingMutilatedBanknote"
def getMutilatedBanknoteModule(self):
"""
Return the Cash Transer Module
"""
return getattr(self.getPortal(), 'mutilated_banknote_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -61,13 +61,6 @@ class TestERP5BankingStopPayment( TestERP5BankingCheckbookDeliveryMixin,
"""
return "ERP5BankingStopPayment"
def getStopPaymentModule(self):
"""
Return the Stop Payment Module
"""
return getattr(self.getPortal(), 'stop_payment_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -61,13 +61,6 @@ class TestERP5BankingTravelerCheckPurchase(TestERP5BankingCheckbookUsualCashTran
"""
return "ERP5BankingTravelerCheckPurchase"
def getTravelerCheckPurchaseModule(self):
"""
Return the Traveler Check Purchase Module
"""
return getattr(self.getPortal(), 'traveler_check_purchase_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -42,14 +42,6 @@ os.environ['EVENT_LOG_SEVERITY'] = '-300'
class TestERP5BankingTravelerCheckSaleMixin(TestERP5BankingMixin):
def getTravelerCheckSaleModule(self):
"""
Return the Traveler Check Sale Module
"""
return getattr(self.getPortal(), 'traveler_check_sale_module', None)
def createCheckbookUsualCashTransferWithTravelerCheck(self, sequence=None,
sequence_list=None, **kwd):
"""
......
......@@ -96,13 +96,6 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin):
"""
return "ERP5BankingUsualCashRendering"
def getUsualCashRenderingModule(self):
"""
Return the Vault Transer Module
"""
return getattr(self.getPortal(), 'usual_cash_rendering_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -84,13 +84,6 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin):
"""
return "ERP5BankingUsualCashTransfer"
def getUsualCashTransferModule(self):
"""
Return the Cash Transer Module
"""
return getattr(self.getPortal(), 'usual_cash_transfer_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
......@@ -96,13 +96,6 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin):
"""
return "ERP5BankingVaultTransfer"
def getVaultTransferModule(self):
"""
Return the Vault Transer Module
"""
return getattr(self.getPortal(), 'vault_transfer_module', None)
def afterSetUp(self):
"""
Method called before the launch of the test to initialize some data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment