Commit a3408e7d authored by Romain Courteaud's avatar Romain Courteaud

slapos_rss_style: test

parent 2380571e
...@@ -493,27 +493,6 @@ class TestSlapOSBase_getTicketRelatedEventList(TestRSSSyleSkinsMixin): ...@@ -493,27 +493,6 @@ class TestSlapOSBase_getTicketRelatedEventList(TestRSSSyleSkinsMixin):
open_related_ticket_list = document.Base_getTicketRelatedEventList() open_related_ticket_list = document.Base_getTicketRelatedEventList()
self.assertEqual(len(open_related_ticket_list), 0) self.assertEqual(len(open_related_ticket_list), 0)
def makeUpgradeDecision(self):
self.portal.portal_skins.changeSkin('View')
person = self.makePerson(self.addProject())
ticket = self.portal.upgrade_decision_module.newContent(
portal_type='Upgrade Decision',
title="Upgrade Decision Test %s" % self.new_id,
reference="TESTUD-%s" % self.new_id)
event = self.portal.event_module.newContent(
portal_type='Web Message',
follow_up_value=ticket,
text_content=ticket.getTitle(),
start_date = DateTime(),
source_value=person,
#destination_value=self.portal.organisation_module.slapos,
resource_value=self.portal.service_module.slapos_crm_monitoring
)
self.tic()
event.start()
self.tic()
return ticket
def test_getTicketRelatedEventList_upgrade_decision_related_to_compute_node(self): def test_getTicketRelatedEventList_upgrade_decision_related_to_compute_node(self):
self._test_getTicketRelatedEventList_upgrade_decision_related( self._test_getTicketRelatedEventList_upgrade_decision_related(
self._makeComputeNode(self.addProject())[0]) self._makeComputeNode(self.addProject())[0])
...@@ -523,13 +502,9 @@ class TestSlapOSBase_getTicketRelatedEventList(TestRSSSyleSkinsMixin): ...@@ -523,13 +502,9 @@ class TestSlapOSBase_getTicketRelatedEventList(TestRSSSyleSkinsMixin):
self._makeInstanceTree()) self._makeInstanceTree())
def _test_getTicketRelatedEventList_upgrade_decision_related(self, document): def _test_getTicketRelatedEventList_upgrade_decision_related(self, document):
ticket = self.makeUpgradeDecision() project = document.getFollowUpValue()
person = self.makePerson(self.addProject(), index=1, user=1) person = self.makePerson(project, index=1, user=1)
ticket.newContent( ticket = self.newUpgradeDecision(person, project)
portal_type="Upgrade Decision Line"
).setAggregateValue(document)
person.newContent(portal_type="Assignment",
group="company").open()
event = ticket.getFollowUpRelatedValue() event = ticket.getFollowUpRelatedValue()
self.tic() self.tic()
...@@ -607,13 +582,10 @@ class TestSlapOSBase_getTicketRelatedEventList(TestRSSSyleSkinsMixin): ...@@ -607,13 +582,10 @@ class TestSlapOSBase_getTicketRelatedEventList(TestRSSSyleSkinsMixin):
self._makeInstanceTree()) self._makeInstanceTree())
def _test_getTicketRelatedEventList_cancelled_upgrade_decision_related(self, document): def _test_getTicketRelatedEventList_cancelled_upgrade_decision_related(self, document):
ticket = self.makeUpgradeDecision() project = document.getFollowUpValue()
person = self.makePerson(self.addProject(), index=1, user=1) person = self.makePerson(project, index=1, user=1)
ticket.newContent( self.addProjectProductionManagerAssignment(person, project)
portal_type="Upgrade Decision Line" ticket = self.newUpgradeDecision(person, project)
).setAggregateValue(document)
person.newContent(portal_type="Assignment",
group="company").open()
self.tic() self.tic()
self.portal.portal_skins.changeSkin('RSS') self.portal.portal_skins.changeSkin('RSS')
...@@ -630,6 +602,7 @@ class TestSlapOSBase_getTicketRelatedEventList(TestRSSSyleSkinsMixin): ...@@ -630,6 +602,7 @@ class TestSlapOSBase_getTicketRelatedEventList(TestRSSSyleSkinsMixin):
ticket.cancel() ticket.cancel()
self.tic() self.tic()
self.portal.portal_skins.changeSkin('RSS')
open_related_ticket_list = document.Base_getTicketRelatedEventList() open_related_ticket_list = document.Base_getTicketRelatedEventList()
self.assertEqual(len(open_related_ticket_list), 0) self.assertEqual(len(open_related_ticket_list), 0)
......
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