Replace assertTrue(*>*) with assertGreater

assertGreater will return nicer error if it fails.

Change-Id: I7dc315c46c9db6de076270ef6a69a05c8a402179
This commit is contained in:
Shu Yingya 2016-12-12 02:42:21 +00:00
parent 1313b625a5
commit 8d9be75590
3 changed files with 3 additions and 3 deletions

View File

@ -182,7 +182,7 @@ class TestClaimsMongoDB(base.V1Base):
self.assertEqual(60, claim['ttl'])
estimated_age = timeutils.delta_seconds(creation, query)
self.assertTrue(estimated_age > claim['age'])
self.assertGreater(estimated_age, claim['age'])
# Delete the claim
self.simulate_delete(claim['href'], 'bad_id')

View File

@ -233,7 +233,7 @@ class TestClaimsMongoDB(base.V1_1Base):
self.assertEqual(60, claim['ttl'])
estimated_age = timeutils.delta_seconds(creation, query)
self.assertTrue(estimated_age > claim['age'])
self.assertGreater(estimated_age, claim['age'])
# Delete the claim
self.simulate_delete(claim['href'], headers=self.headers)

View File

@ -234,7 +234,7 @@ class TestClaimsMongoDB(base.V2Base):
self.assertEqual(60, claim['ttl'])
estimated_age = timeutils.delta_seconds(creation, query)
self.assertTrue(estimated_age > claim['age'])
self.assertGreater(estimated_age, claim['age'])
# Delete the claim
self.simulate_delete(claim['href'], headers=self.headers)