Commit 11ba14cf authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Alain Takoudjou

slapos_crm: set correct variable name

parent 30017fbb
...@@ -2179,11 +2179,11 @@ class TestSlapOSComputer_notifyWrongAllocationScope(testSlapOSMixin): ...@@ -2179,11 +2179,11 @@ class TestSlapOSComputer_notifyWrongAllocationScope(testSlapOSMixin):
'return context.restrictedTraverse(' \ 'return context.restrictedTraverse(' \
'context.REQUEST["test_computerNotAllowedAllocationScope_OpenPublic"])') 'context.REQUEST["test_computerNotAllowedAllocationScope_OpenPublic"])')
@simulate('SupportRequest_trySendNotificationMessage', @simulate('SupportRequest_trySendNotificationMessage',
'message_title, message, source_relative_url', 'message_title, message, destination_relative_url',
'context.portal_workflow.doActionFor(' \ 'context.portal_workflow.doActionFor(' \
'context, action="edit_action", ' \ 'context, action="edit_action", ' \
'comment="Visited by SupportRequest_trySendNotificationMessage ' \ 'comment="Visited by SupportRequest_trySendNotificationMessage ' \
'%s %s %s" % (message_title, message, source_relative_url))\n' \ '%s %s %s" % (message_title, message, destination_relative_url))\n' \
'return 1') 'return 1')
def test_computerNotAllowedAllocationScope_OpenPublic(self): def test_computerNotAllowedAllocationScope_OpenPublic(self):
computer = self._makeComputer() computer = self._makeComputer()
...@@ -2215,11 +2215,11 @@ class TestSlapOSComputer_notifyWrongAllocationScope(testSlapOSMixin): ...@@ -2215,11 +2215,11 @@ class TestSlapOSComputer_notifyWrongAllocationScope(testSlapOSMixin):
'return context.restrictedTraverse(' \ 'return context.restrictedTraverse(' \
'context.REQUEST["test_computerNotAllowedAllocationScope_OpenFriend"])') 'context.REQUEST["test_computerNotAllowedAllocationScope_OpenFriend"])')
@simulate('SupportRequest_trySendNotificationMessage', @simulate('SupportRequest_trySendNotificationMessage',
'message_title, message, source_relative_url', 'message_title, message, destination_relative_url',
'context.portal_workflow.doActionFor(' \ 'context.portal_workflow.doActionFor(' \
'context, action="edit_action", ' \ 'context, action="edit_action", ' \
'comment="Visited by SupportRequest_trySendNotificationMessage ' \ 'comment="Visited by SupportRequest_trySendNotificationMessage ' \
'%s %s %s" % (message_title, message, source_relative_url))\n' \ '%s %s %s" % (message_title, message, destination_relative_url))\n' \
'return 1') 'return 1')
def test_computerNotAllowedAllocationScope_OpenFriend(self): def test_computerNotAllowedAllocationScope_OpenFriend(self):
computer = self._makeComputer() computer = self._makeComputer()
...@@ -2250,11 +2250,11 @@ class TestSlapOSComputer_notifyWrongAllocationScope(testSlapOSMixin): ...@@ -2250,11 +2250,11 @@ class TestSlapOSComputer_notifyWrongAllocationScope(testSlapOSMixin):
'return context.restrictedTraverse(' \ 'return context.restrictedTraverse(' \
'context.REQUEST["test_computerToCloseAllocationScope_OpenPersonal"])') 'context.REQUEST["test_computerToCloseAllocationScope_OpenPersonal"])')
@simulate('SupportRequest_trySendNotificationMessage', @simulate('SupportRequest_trySendNotificationMessage',
'message_title, message, source_relative_url', 'message_title, message, destination_relative_url',
'context.portal_workflow.doActionFor(' \ 'context.portal_workflow.doActionFor(' \
'context, action="edit_action", ' \ 'context, action="edit_action", ' \
'comment="Visited by SupportRequest_trySendNotificationMessage ' \ 'comment="Visited by SupportRequest_trySendNotificationMessage ' \
'%s %s %s" % (message_title, message, source_relative_url))\n' \ '%s %s %s" % (message_title, message, destination_relative_url))\n' \
'return 1') 'return 1')
def test_computerToCloseAllocationScope_OpenPersonal(self): def test_computerToCloseAllocationScope_OpenPersonal(self):
computer = self._makeComputer() computer = self._makeComputer()
...@@ -2826,11 +2826,11 @@ class TestSlapOSComputer_CheckState(testSlapOSMixin): ...@@ -2826,11 +2826,11 @@ class TestSlapOSComputer_CheckState(testSlapOSMixin):
'return context.restrictedTraverse(' \ 'return context.restrictedTraverse(' \
'context.REQUEST["test_Computer_checkState_notify"])') 'context.REQUEST["test_Computer_checkState_notify"])')
@simulate('SupportRequest_trySendNotificationMessage', @simulate('SupportRequest_trySendNotificationMessage',
'message_title, message, source_relative_url', 'message_title, message, destination_relative_url',
'context.portal_workflow.doActionFor(' \ 'context.portal_workflow.doActionFor(' \
'context, action="edit_action", ' \ 'context, action="edit_action", ' \
'comment="Visited by SupportRequest_trySendNotificationMessage ' \ 'comment="Visited by SupportRequest_trySendNotificationMessage ' \
'%s %s %s" % (message_title, message, source_relative_url))') '%s %s %s" % (message_title, message, destination_relative_url))')
def test_Computer_checkState_notify(self): def test_Computer_checkState_notify(self):
computer = self._makeComputer() computer = self._makeComputer()
person = computer.getSourceAdministrationValue() person = computer.getSourceAdministrationValue()
...@@ -2868,11 +2868,11 @@ class TestSlapOSComputer_CheckState(testSlapOSMixin): ...@@ -2868,11 +2868,11 @@ class TestSlapOSComputer_CheckState(testSlapOSMixin):
'return context.restrictedTraverse(' \ 'return context.restrictedTraverse(' \
'context.REQUEST["test_Computer_checkState_empty_cache_notify"])') 'context.REQUEST["test_Computer_checkState_empty_cache_notify"])')
@simulate('SupportRequest_trySendNotificationMessage', @simulate('SupportRequest_trySendNotificationMessage',
'message_title, message, source_relative_url', 'message_title, message, destination_relative_url',
'context.portal_workflow.doActionFor(' \ 'context.portal_workflow.doActionFor(' \
'context, action="edit_action", ' \ 'context, action="edit_action", ' \
'comment="Visited by SupportRequest_trySendNotificationMessage ' \ 'comment="Visited by SupportRequest_trySendNotificationMessage ' \
'%s %s %s" % (message_title, message, source_relative_url))') '%s %s %s" % (message_title, message, destination_relative_url))')
def test_Computer_checkState_empty_cache_notify(self): def test_Computer_checkState_empty_cache_notify(self):
computer = self._makeComputer() computer = self._makeComputer()
person = computer.getSourceAdministrationValue() person = computer.getSourceAdministrationValue()
...@@ -2937,11 +2937,11 @@ class TestSlapOSHostingSubscription_createSupportRequestEvent(testSlapOSMixin): ...@@ -2937,11 +2937,11 @@ class TestSlapOSHostingSubscription_createSupportRequestEvent(testSlapOSMixin):
'return context.restrictedTraverse(' \ 'return context.restrictedTraverse(' \
'context.REQUEST["testHostingSubscription_createSupportRequestEvent"])') 'context.REQUEST["testHostingSubscription_createSupportRequestEvent"])')
@simulate('SupportRequest_trySendNotificationMessage', @simulate('SupportRequest_trySendNotificationMessage',
'message_title, message, source_relative_url', 'message_title, message, destination_relative_url',
'context.portal_workflow.doActionFor(' \ 'context.portal_workflow.doActionFor(' \
'context, action="edit_action", ' \ 'context, action="edit_action", ' \
'comment="Visited by SupportRequest_trySendNotificationMessage ' \ 'comment="Visited by SupportRequest_trySendNotificationMessage ' \
'%s %s %s" % (message_title, message, source_relative_url))') '%s %s %s" % (message_title, message, destination_relative_url))')
def testHostingSubscription_createSupportRequestEvent(self): def testHostingSubscription_createSupportRequestEvent(self):
hosting_subscription = self._makeHostingSubscription() hosting_subscription = self._makeHostingSubscription()
person = hosting_subscription.getDestinationSectionValue() person = hosting_subscription.getDestinationSectionValue()
...@@ -3319,7 +3319,7 @@ class TestSupportRequestTrySendNotificationMessage(testSlapOSMixin): ...@@ -3319,7 +3319,7 @@ class TestSupportRequestTrySendNotificationMessage(testSlapOSMixin):
first_event = support_request.SupportRequest_trySendNotificationMessage( first_event = support_request.SupportRequest_trySendNotificationMessage(
message_title=title, message=text_content, message_title=title, message=text_content,
source_relative_url=person.getRelativeUrl() destination_relative_url=person.getRelativeUrl()
) )
self.assertNotEqual(first_event, None) self.assertNotEqual(first_event, None)
...@@ -3337,7 +3337,7 @@ class TestSupportRequestTrySendNotificationMessage(testSlapOSMixin): ...@@ -3337,7 +3337,7 @@ class TestSupportRequestTrySendNotificationMessage(testSlapOSMixin):
event = support_request.SupportRequest_trySendNotificationMessage( event = support_request.SupportRequest_trySendNotificationMessage(
message_title=title, message=text_content, message_title=title, message=text_content,
source_relative_url=person.getRelativeUrl() destination_relative_url=person.getRelativeUrl()
) )
self.assertEqual(event, first_event) self.assertEqual(event, first_event)
...@@ -3351,7 +3351,7 @@ class TestSupportRequestTrySendNotificationMessage(testSlapOSMixin): ...@@ -3351,7 +3351,7 @@ class TestSupportRequestTrySendNotificationMessage(testSlapOSMixin):
title += "__zz" title += "__zz"
event = support_request.SupportRequest_trySendNotificationMessage( event = support_request.SupportRequest_trySendNotificationMessage(
message_title=title, message=text_content, message_title=title, message=text_content,
source_relative_url=person.getRelativeUrl(), destination_relative_url=person.getRelativeUrl(),
) )
self.assertEqual(event.getTitle(), title) self.assertEqual(event.getTitle(), title)
...@@ -3371,7 +3371,7 @@ class TestSupportRequestTrySendNotificationMessage(testSlapOSMixin): ...@@ -3371,7 +3371,7 @@ class TestSupportRequestTrySendNotificationMessage(testSlapOSMixin):
another_first_event = \ another_first_event = \
another_support_request.SupportRequest_trySendNotificationMessage( another_support_request.SupportRequest_trySendNotificationMessage(
message_title=title, message=text_content, message_title=title, message=text_content,
source_relative_url=person.getRelativeUrl()) destination_relative_url=person.getRelativeUrl())
self.assertNotEqual(another_first_event, None) self.assertNotEqual(another_first_event, None)
......
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