Commit 819fe45b authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_hr&test: use Campaign as announcement

parent 24e0433c
......@@ -65,6 +65,10 @@
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
......@@ -120,7 +124,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(\'\', \'\')] + [(x.getTitle(), x.getRelativeUrl()) for x in context.portal_catalog(portal_type=\'Position Announcement\', validation_state=(\'published\',\'published_alive\'))]</string> </value>
<value> <string>python: [(\'\', \'\')] + [(x.getTitle(), x.getRelativeUrl()) for x in context.portal_catalog(portal_type=\'Campaign\', simulation_state=\'validated\')]</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -77,8 +77,8 @@
<value>
<list>
<tuple>
<string>Position Announcement</string>
<string>Position Announcement</string>
<string>Campaign</string>
<string>Campaign</string>
</tuple>
</list>
</value>
......
......@@ -56,7 +56,7 @@ class testPosition(ERP5TypeTestCase):
person_url_2 = portal.person_module.newContent(portal_type='Person').getRelativeUrl()
person_url_3 = portal.person_module.newContent(portal_type='Person').getRelativeUrl()
position = portal.position_module.newContent(portal_type='Position')
position_announcement = portal.position_announcement_module.newContent(portal_type='Position Announcement')
position_announcement = portal.campaign_module.newContent(portal_type='Campaign')
position_application = portal.PositionApplicationModule_addPositionApplication(
position=position.getRelativeUrl(),
position_announcement=position_announcement.getRelativeUrl(),
......@@ -68,7 +68,7 @@ class testPosition(ERP5TypeTestCase):
batch=1)
self.tic()
self.assertEqual(position_application.getFollowUpValue(portal_type='Position'), position)
self.assertEqual(position_application.getAggregateValue(portal_type='Position Announcement'), position_announcement)
self.assertEqual(position_application.getAggregateValue(portal_type='Campaign'), position_announcement)
self.assertEqual(position_application.getSimulationState(), 'suspended')
self.assertEqual(position_application.getSourceTradeList(), [person_url])
self.assertEqual(position_application.getSource(), person_url_3)
......@@ -91,7 +91,7 @@ class testPosition(ERP5TypeTestCase):
def test_createPositionApplicationWithMessage(self):
portal = self.getPortalObject()
position = portal.position_module.newContent(portal_type='Position')
position_announcement = portal.position_announcement_module.newContent(portal_type='Position Announcement')
position_announcement = portal.campaign_module.newContent(portal_type='Campaign')
if not portal.notification_message_module.has_key('test_position_application'):
notification_message = portal.notification_message_module.newContent(portal_type='Notification Message', reference='test_position_application',id='test_position_application')
notification_message.validate()
......@@ -116,7 +116,7 @@ class testPosition(ERP5TypeTestCase):
def test_createPositionApplicationWithDocument(self):
portal = self.getPortalObject()
position = portal.position_module.newContent(portal_type='Position')
position_announcement = portal.position_announcement_module.newContent(portal_type='Position Announcement')
position_announcement = portal.campaign_module.newContent(portal_type='Campaign')
position_application = portal.PositionApplicationModule_addPositionApplication(
position=position.getRelativeUrl(),
position_announcement=position_announcement.getRelativeUrl(),
......
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