From e6f3fe205f91a1aba5453b204716d8f87537b3ce Mon Sep 17 00:00:00 2001 From: Cameron Yick Date: Sat, 12 Dec 2020 16:58:50 -0500 Subject: [PATCH] [testing] Replace deprecated assertRaisesRegexexp with assertRaisesRegex --- HISTORY.rst | 2 +- tests/test_restclient.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4bfea51..95e5ccf 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,7 +13,7 @@ History * Feature: Add option to request data in csv format in get_dataframe method potentially boosting speed up to 4-5x. (#523) * Minor: bumped library dependencies, in particular cryptography * Development: Dropped official support for Python 3.5, replaced with 3.7 -* Development: Publish library with Github Actions instead of Travis (#546 +* Development: Publish library with Github Actions instead of Travis (#546) 0.12.0 (2019-10-20) -------------------- diff --git a/tests/test_restclient.py b/tests/test_restclient.py index 247abd1..001f9a3 100644 --- a/tests/test_restclient.py +++ b/tests/test_restclient.py @@ -34,7 +34,7 @@ class TestRestClient(TestCase): # Test 404 error def test_invalid_url(self): - with self.assertRaisesRegexp(RestClientError, "404"),\ + with self.assertRaisesRegex(RestClientError, "404"),\ vcr.use_cassette('tests/fixtures/invalid_url.yaml'): # Should return 404 error self._client._request('GET', "bing_is_great") @@ -66,7 +66,7 @@ class TestRestClientWithSession(TestCase): # Test 404 error def test_invalid_url(self): - with self.assertRaisesRegexp(RestClientError, "404"),\ + with self.assertRaisesRegex(RestClientError, "404"),\ vcr.use_cassette('tests/fixtures/invalid_url.yaml'): # Should return 404 error self._client._request('GET', "bing_is_great")