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

erp5_hr&test: use Campaign as announcement

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