From 8d9be7559010b148a6bd3894dd826063690342cf Mon Sep 17 00:00:00 2001 From: Shu Yingya Date: Mon, 12 Dec 2016 02:42:21 +0000 Subject: [PATCH] Replace assertTrue(*>*) with assertGreater assertGreater will return nicer error if it fails. Change-Id: I7dc315c46c9db6de076270ef6a69a05c8a402179 --- zaqar/tests/unit/transport/wsgi/v1/test_claims.py | 2 +- zaqar/tests/unit/transport/wsgi/v1_1/test_claims.py | 2 +- zaqar/tests/unit/transport/wsgi/v2_0/test_claims.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zaqar/tests/unit/transport/wsgi/v1/test_claims.py b/zaqar/tests/unit/transport/wsgi/v1/test_claims.py index 0a6316816..bd21111e8 100644 --- a/zaqar/tests/unit/transport/wsgi/v1/test_claims.py +++ b/zaqar/tests/unit/transport/wsgi/v1/test_claims.py @@ -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') diff --git a/zaqar/tests/unit/transport/wsgi/v1_1/test_claims.py b/zaqar/tests/unit/transport/wsgi/v1_1/test_claims.py index e4c57667d..83d9e36b8 100644 --- a/zaqar/tests/unit/transport/wsgi/v1_1/test_claims.py +++ b/zaqar/tests/unit/transport/wsgi/v1_1/test_claims.py @@ -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) diff --git a/zaqar/tests/unit/transport/wsgi/v2_0/test_claims.py b/zaqar/tests/unit/transport/wsgi/v2_0/test_claims.py index 4e5043f4e..6087f7a84 100644 --- a/zaqar/tests/unit/transport/wsgi/v2_0/test_claims.py +++ b/zaqar/tests/unit/transport/wsgi/v2_0/test_claims.py @@ -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)