# HG changeset patch # User Julien Cristau # Date 1446571755 -3600 # Node ID 252877c624f05acdb9a98b7365933adf70147325 # Parent 375a8232e61c2d9e6e78f63a58e676651b86afd0 [dataimport/test] use the right assert methods instead of assertTrue with a comparison diff -r 375a8232e61c -r 252877c624f0 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()