From 61e209d9bc946563bd7dc645a8a65f14d94246f1 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 13 Jul 2023 10:48:10 -0400 Subject: [PATCH] Use TestCase.assertTrue() instead of TestCase.assert_() The assert_() method is deprecated and will be removed in Python 3.12. --- tests/test_resource.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_resource.py b/tests/test_resource.py index 7fb544d6..ceb9ee70 100644 --- a/tests/test_resource.py +++ b/tests/test_resource.py @@ -183,11 +183,11 @@ def test_context_factory(self): def test_explicit_collection_service_name(self): route_url = testing.DummyRequest().route_url # service must exist - self.assert_(route_url('collection_user_service')) + self.assertTrue(route_url('collection_user_service')) def test_explicit_service_name(self): route_url = testing.DummyRequest().route_url - self.assert_(route_url('user_service', id=42)) # service must exist + self.assertTrue(route_url('user_service', id=42)) # service must exist @mock.patch('cornice.resource.Service') def test_factory_is_autowired(self, mocked_service):