Commit 045be5d3 authored by Łukasz Nowak's avatar Łukasz Nowak

Check list of categories.

parent 3c7c559f
...@@ -75,6 +75,11 @@ class TestOpenSaleOrderAlarm(testSlapOSMixin): ...@@ -75,6 +75,11 @@ class TestOpenSaleOrderAlarm(testSlapOSMixin):
self.assertEqual('SlapOS Subscription Open Sale Order', self.assertEqual('SlapOS Subscription Open Sale Order',
open_sale_order.getTitle()) open_sale_order.getTitle())
self.assertEqual(0, len(open_sale_order.contentValues()))
open_sale_order_template = self.portal.restrictedTraverse(
self.portal.portal_preferences.getPreferredOpenSaleOrderTemplate())
self.assertTrue(all([q in open_sale_order.getCategoryList() \
for q in open_sale_order_template.getCategoryList()]))
@simulateHostingSubscription_requestUpdateOpenSaleOrder @simulateHostingSubscription_requestUpdateOpenSaleOrder
def test_alarm_HS_validated(self): def test_alarm_HS_validated(self):
...@@ -235,6 +240,8 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin): ...@@ -235,6 +240,8 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
self.portal.portal_preferences.getPreferredOpenSaleOrderLineTemplate()) self.portal.portal_preferences.getPreferredOpenSaleOrderLineTemplate())
self.assertEqual(open_sale_order_line_template.getResource(), self.assertEqual(open_sale_order_line_template.getResource(),
line.getResource()) line.getResource())
self.assertTrue(all([q in line.getCategoryList() \
for q in open_sale_order_line_template.getCategoryList()]))
self.assertEqual(None, line.getStartDate()) self.assertEqual(None, line.getStartDate())
def test_usualLifetime_HostingSubscription(self): def test_usualLifetime_HostingSubscription(self):
...@@ -280,6 +287,8 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin): ...@@ -280,6 +287,8 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
self.assertEqual(subscription.getRelativeUrl(), line.getAggregate()) self.assertEqual(subscription.getRelativeUrl(), line.getAggregate())
open_sale_order_line_template = self.portal.restrictedTraverse( open_sale_order_line_template = self.portal.restrictedTraverse(
self.portal.portal_preferences.getPreferredOpenSaleOrderLineTemplate()) self.portal.portal_preferences.getPreferredOpenSaleOrderLineTemplate())
self.assertTrue(all([q in line.getCategoryList() \
for q in open_sale_order_line_template.getCategoryList()]))
self.assertEqual(open_sale_order_line_template.getResource(), self.assertEqual(open_sale_order_line_template.getResource(),
line.getResource()) line.getResource())
self.assertEqual(request_time, line.getStartDate()) self.assertEqual(request_time, line.getStartDate())
...@@ -329,6 +338,8 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin): ...@@ -329,6 +338,8 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
self.assertEqual(subscription.getRelativeUrl(), self.assertEqual(subscription.getRelativeUrl(),
archived_line.getAggregate()) archived_line.getAggregate())
self.assertTrue(all([q in archived_line.getCategoryList() \
for q in open_sale_order_line_template.getCategoryList()]))
self.assertEqual(open_sale_order_line_template.getResource(), self.assertEqual(open_sale_order_line_template.getResource(),
archived_line.getResource()) archived_line.getResource())
self.assertEqual(request_time, archived_line.getStartDate()) self.assertEqual(request_time, archived_line.getStartDate())
......
15 16
\ No newline at end of file \ No newline at end of file
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