Commit a9942a1b authored by Arnaud Fontaine's avatar Arnaud Fontaine

erp5_budget: Fix errors/warnings reported by pylint.

parent c94dd3f5
...@@ -85,7 +85,7 @@ class TestBudget(ERP5TypeTestCase): ...@@ -85,7 +85,7 @@ class TestBudget(ERP5TypeTestCase):
budget = self.portal.budget_module.newContent( budget = self.portal.budget_module.newContent(
portal_type='Budget') portal_type='Budget')
budget_line = budget.newContent(portal_type='Budget Line') budget_line = budget.newContent(portal_type='Budget Line')
budget_cell = budget_line.newContent(portal_type='Budget Cell') budget_line.newContent(portal_type='Budget Cell')
self.assertEqual([], budget.checkConsistency()) self.assertEqual([], budget.checkConsistency())
def test_budget_cell_node_variation_with_aggregate(self): def test_budget_cell_node_variation_with_aggregate(self):
...@@ -626,17 +626,18 @@ class TestBudget(ERP5TypeTestCase): ...@@ -626,17 +626,18 @@ class TestBudget(ERP5TypeTestCase):
self.assertEqual(2, len(budget_line.contentValues())) self.assertEqual(2, len(budget_line.contentValues()))
test_class_self = self
class ReferenceQuery: class ReferenceQuery:
"""Helper class to compare queries """Helper class to compare queries
""" """
def __eq__(me, query): def __eq__(self, query):
self.assertTrue(isinstance(query, ComplexQuery)) test_class_self.assertTrue(isinstance(query, ComplexQuery))
self.assertEqual(query.logical_operator, 'or') test_class_self.assertEqual(query.logical_operator, 'or')
self.assertEqual(2, len(query.query_list)) test_class_self.assertEqual(2, len(query.query_list))
self.assertEqual(query.query_list[0].kw, {'project_uid': None}) test_class_self.assertEqual(query.query_list[0].kw, {'project_uid': None})
self.assertEqual(query.query_list[1].kw, test_class_self.assertEqual(query.query_list[1].kw,
{'project_uid': {'project_uid':
[self.portal.organisation_module.my_organisation.getUid()]}) [test_class_self.portal.organisation_module.my_organisation.getUid()]})
return True return True
self.assertEqual( self.assertEqual(
...@@ -730,12 +731,13 @@ class TestBudget(ERP5TypeTestCase): ...@@ -730,12 +731,13 @@ class TestBudget(ERP5TypeTestCase):
self.assertEqual(1, len(budget_line.contentValues())) self.assertEqual(1, len(budget_line.contentValues()))
test_class_self = self
class ReferenceQuery: class ReferenceQuery:
"""Helper class to compare queries """Helper class to compare queries
""" """
def __eq__(me, query): def __eq__(self, query):
self.assertTrue(isinstance(query, Query)) test_class_self.assertTrue(isinstance(query, Query))
self.assertEqual(query.kw, {'project_uid': None}) test_class_self.assertEqual(query.kw, {'project_uid': None})
return True return True
self.assertEqual( self.assertEqual(
......
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