Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor deprecated unittest aliases for Python 3.11 compatibility. #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import warnings
import six
try:
from mock import patch, call
except ImportError:
Expand All @@ -11,14 +12,14 @@ class TestClient(ClientTestCase):
def test_version_values(self):
values = self.client._version_values()
self.assertEqual('Python', values['language'])
self.assertRegexpMatches(values['version'], r'[0-9]+[.][0-9]+[.][0-9]+')
six.assertRegex(self, values['version'], r'[0-9]+[.][0-9]+[.][0-9]+')
self.assertSetEqual(
{'language', 'version', 'language_version', 'os', 'os_version'},
set(values.keys()))

def test_version_header(self):
self.assertRegexpMatches(
self.client._version_header(), r'language=Python')
six.assertRegex(
self, self.client._version_header(), r'language=Python')

def test_default_headers(self):
self.client.headers['key'] = 'value'
Expand Down