Commit 83b58b56 authored by Łukasz Nowak's avatar Łukasz Nowak

Finalise test.

ERP5Site_newCredentialRequest shall disallow to create duplicated credentials.
parent 7c2d43d5
...@@ -1021,7 +1021,8 @@ class TestERP5Credential(ERP5TypeTestCase): ...@@ -1021,7 +1021,8 @@ class TestERP5Credential(ERP5TypeTestCase):
sequence = dict(automatic_call=True) sequence = dict(automatic_call=True)
self.stepSetCredentialRequestAutomaticApprovalPreferences(sequence) self.stepSetCredentialRequestAutomaticApprovalPreferences(sequence)
self.stepSetCredentialAssignmentPropertyList() self.stepSetCredentialAssignmentPropertyList()
self._createCredentialRequest() response = self._createCredentialRequest()
self.assertTrue('Credential%20Request%20Created.' in response)
portal_catalog = self.portal.portal_catalog portal_catalog = self.portal.portal_catalog
credential_request = portal_catalog.getResultValue( credential_request = portal_catalog.getResultValue(
portal_type="Credential Request", reference="barney") portal_type="Credential Request", reference="barney")
...@@ -1036,15 +1037,13 @@ class TestERP5Credential(ERP5TypeTestCase): ...@@ -1036,15 +1037,13 @@ class TestERP5Credential(ERP5TypeTestCase):
self.tic() self.tic()
self.assertEqual('accepted', credential_request.getValidationState()) self.assertEqual('accepted', credential_request.getValidationState())
self._createCredentialRequest() response = self._createCredentialRequest()
credential_request = portal_catalog.getResultValue( self.assertTrue('Selected%20login%20is%20already%20in%20use%2C%20pl'
portal_type="Credential Request", reference="barney", 'ease%20choose%20different%20one' in response)
validation_state="draft")
self.portal.portal_alarms.accept_submitted_credentials.activeSense() self.portal.portal_alarms.accept_submitted_credentials.activeSense()
transaction.commit() transaction.commit()
self.tic() self.tic()
raise NotImplementedError('Real case is not known yet.')
self.stepUnSetCredentialAutomaticApprovalPreferences() self.stepUnSetCredentialAutomaticApprovalPreferences()
def testERP5Site_newCredentialRecoveryWithNoSecurityQuestion(self): def testERP5Site_newCredentialRecoveryWithNoSecurityQuestion(self):
......
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