Replace assertTrue(*>*) with assertGreater
assertGreater will return nicer error if it fails. Change-Id: I7dc315c46c9db6de076270ef6a69a05c8a402179
This commit is contained in:
parent
1313b625a5
commit
8d9be75590
@ -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')
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user