Commit ad4712c3 authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Update tests using better and meaningful assert

parent 9d69be8e
...@@ -1717,7 +1717,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor): ...@@ -1717,7 +1717,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
# check filter # check filter
filter_dict = catalog.getFilterDict() filter_dict = catalog.getFilterDict()
filter_dict = filter_dict[method_id] filter_dict = filter_dict[method_id]
self.assertEqual(filter_dict['expression_cache_key'], ['portal_type']) self.assertItemsEqual(filter_dict['expression_cache_key'], ['portal_type'])
self.assertEqual(filter_dict['type'], []) self.assertEqual(filter_dict['type'], [])
self.assertEqual(filter_dict['filtered'], 1) self.assertEqual(filter_dict['filtered'], 1)
self.assertEqual(filter_dict['expression'], 'python: context.isPredicate()') self.assertEqual(filter_dict['expression'], 'python: context.isPredicate()')
...@@ -1734,7 +1734,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor): ...@@ -1734,7 +1734,7 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
# check filter # check filter
filter_dict = catalog.getFilterDict() filter_dict = catalog.getFilterDict()
filter_dict = filter_dict[method_id] filter_dict = filter_dict[method_id]
self.assertEqual(filter_dict['expression_cache_key'], ['portal_type']) self.assertItemsEqual(filter_dict['expression_cache_key'], ['portal_type'])
self.assertEqual(filter_dict['type'], []) self.assertEqual(filter_dict['type'], [])
self.assertEqual(filter_dict['filtered'], 1) self.assertEqual(filter_dict['filtered'], 1)
self.assertEqual(filter_dict['expression'], 'python: context.isDelivery()') self.assertEqual(filter_dict['expression'], 'python: context.isDelivery()')
......
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