Skip to content

Commit

Permalink
Use TestCase.assertTrue() instead of TestCase.assert_()
Browse files Browse the repository at this point in the history
The assert_() method is deprecated and will be removed in Python 3.12.
  • Loading branch information
musicinmybrain committed Jul 13, 2023
1 parent 06f9de7 commit 61e209d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 61e209d

Please sign in to comment.