Commit a8daf7f8 authored by Julien Muchembled's avatar Julien Muchembled

testSha{Cache,Dir}: decorate broken asserts instead of whole test cases

parent 7f73b507
...@@ -132,7 +132,6 @@ class TestShaCache(ShaCacheMixin, ERP5TypeTestCase): ...@@ -132,7 +132,6 @@ class TestShaCache(ShaCacheMixin, ERP5TypeTestCase):
self.assertEquals('published', document2.getValidationState()) self.assertEquals('published', document2.getValidationState())
self.assertEquals('archived', document.getValidationState()) self.assertEquals('archived', document.getValidationState())
@expectedFailure
def test_put_file_twice_no_tic(self): def test_put_file_twice_no_tic(self):
self.postFile() self.postFile()
self.commit() self.commit()
...@@ -142,5 +141,5 @@ class TestShaCache(ShaCacheMixin, ERP5TypeTestCase): ...@@ -142,5 +141,5 @@ class TestShaCache(ShaCacheMixin, ERP5TypeTestCase):
document_list = self.portal.portal_catalog(reference=self.key) document_list = self.portal.portal_catalog(reference=self.key)
self.assertEqual(2, len(document_list)) self.assertEqual(2, len(document_list))
self.assertEqual(sorted(['archived', 'published']), sorted([ expectedFailure(self.assertEqual)(sorted(['archived', 'published']),
q.getValidationState() for q in document_list])) sorted(q.getValidationState() for q in document_list))
...@@ -163,7 +163,6 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase): ...@@ -163,7 +163,6 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
self.assertEquals(1, len(information_list)) self.assertEquals(1, len(information_list))
self.assertEquals(json.dumps(information_list[0]), self.data) self.assertEquals(json.dumps(information_list[0]), self.data)
@expectedFailure
def test_post_information_more_than_once_no_tic(self): def test_post_information_more_than_once_no_tic(self):
""" """
Check if posting information is working. Check if posting information is working.
...@@ -174,8 +173,8 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase): ...@@ -174,8 +173,8 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
self.postInformation() self.postInformation()
self.tic() self.tic()
self.assertEqual(1, self.portal.portal_catalog.countResults( expectedFailure(self.assertEqual)(1,
reference=self.key)[0][0]) self.portal.portal_catalog.countResults(reference=self.key)[0][0])
data_set = self.portal.portal_catalog.getResultValue( data_set = self.portal.portal_catalog.getResultValue(
reference=self.key) reference=self.key)
self.assertEqual(self.key, data_set.getReference()) self.assertEqual(self.key, data_set.getReference())
......
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