Commit 82822bfb authored by Jérome Perrin's avatar Jérome Perrin

test: expectedFailure on python3 can only be set on test method

parent 4c6807d1
......@@ -1419,6 +1419,7 @@ class TestResource(ERP5TypeTestCase):
self.assertEqual(resource.getInternalSupplyLineDestinationReference(),
'test_destination_reference_on_internal_supply_line')
@expectedFailure
def testQuantityUnitOnMovement(self):
"""Make sure that changing default quantity unit on resource does not
affect to movement.
......@@ -1471,7 +1472,8 @@ class TestResource(ERP5TypeTestCase):
# Check existing movement again and make sure that quantity
# unit is not changed.
expectedFailure(self.assertEqual)(
# XXX This is the expectedFailure
self.assertEqual(
sale_order_line.getQuantityUnitValue(),
self.quantity_unit_gram)
......
......@@ -164,6 +164,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
self.assertEqual(1, len(information_list))
self.assertEqual(json.dumps(information_list[0]), self.data)
@expectedFailure
def test_post_information_more_than_once_no_tic(self):
"""
Check if posting information is working.
......@@ -174,7 +175,8 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
self.postInformation()
self.tic()
expectedFailure(self.assertEqual)(1,
# XXX this is the expected failure
self.assertEqual(1,
self.portal.portal_catalog.countResults(reference=self.key)[0][0])
data_set = self.portal.portal_catalog.getResultValue(
reference=self.key)
......
......@@ -73,7 +73,7 @@ class TestStaticWebSiteRedirection(ERP5TypeTestCase):
self.tic()
return website
def runTestRedirect(self, source_path, expected_failure=None,
def runTestRedirect(self, source_path,
use_moved_temporarily=None,
configuration_service_worker_url=None, **kw):
"""
......
......@@ -265,12 +265,10 @@ class TestSQLCatalog(ERP5TypeTestCase):
self.assertRaises(exception, self._catalog, src__=1, query_table='foo', **kw)
def catalog(self, reference_tree, kw, check_search_text=True,
check_select_expression=True, expected_failure=False):
check_select_expression=True):
reference_param_dict = self._catalog.buildSQLQuery(query_table='foo', **kw)
query = self._catalog.buildEntireQuery(kw).query
assertEqual = self.assertEqual
if expected_failure:
assertEqual = unittest.expectedFailure(assertEqual)
assertEqual(reference_tree, query)
search_text = query.asSearchTextExpression(self._catalog)
......
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