[dataimport/test] use the right assert methods instead of assertTrue with a comparison
authorJulien Cristau <julien.cristau@logilab.fr>
Tue, 03 Nov 2015 18:29:15 +0100
changeset 10860 252877c624f0
parent 10859 375a8232e61c
child 10861 6205b89c3af6
[dataimport/test] use the right assert methods instead of assertTrue with a comparison
dataimport/test/test_massive_store.py
--- a/dataimport/test/test_massive_store.py	Wed Oct 21 20:20:36 2015 +0200
+++ b/dataimport/test/test_massive_store.py	Tue Nov 03 18:29:15 2015 +0100
@@ -172,14 +172,14 @@
             cnx.commit()
         with self.admin_access.repo_cnx() as cnx:
             crs = cnx.system_sql("SELECT * FROM entities_id_seq")
-            self.assertTrue(crs.fetchone()[0] > 50000)
+            self.assertGreater(crs.fetchone()[0], 50000)
 
     def test_eid_entity(self):
         with self.admin_access.repo_cnx() as cnx:
             store = MassiveObjectStore(cnx, eids_seq_range=1000, eids_seq_start=50000)
             entity = store.create_entity('Location', name=u'toto')
             store.flush()
-            self.assertTrue(entity.eid > 50000)
+            self.assertGreater(entity.eid, 50000)
 
     def test_eid_entity_2(self):
         with self.admin_access.repo_cnx() as cnx:
@@ -187,7 +187,7 @@
             entity = store.create_entity('Location', name=u'toto', eid=10000)
             store.flush()
         with self.admin_access.repo_cnx() as cnx:
-            self.assertTrue(entity.eid==10000)
+            self.assertEqual(entity.eid, 10000)
 
     def test_on_commit_callback(self):
         counter = itertools.count()