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

Use assertRegex for Python 3.11 compatibility. #6225

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion posthog/api/test/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_create_dashboard_item(self):
dashboard_item = DashboardItem.objects.get()
self.assertEqual(dashboard_item.name, "dashboard item")
# Short ID is automatically generated
self.assertRegexpMatches(dashboard_item.short_id, r"[0-9A-Za-z_-]{8}")
self.assertRegex(dashboard_item.short_id, r"[0-9A-Za-z_-]{8}")

def test_token_auth(self):
self.client.logout()
Expand Down
2 changes: 1 addition & 1 deletion posthog/test/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ def test_short_id_and_team_must_be_unique_together(self):

def test_short_id_is_automatically_generated(self):
d = DashboardItem.objects.create(team=self.team)
self.assertRegexpMatches(d.short_id, r"[0-9A-Za-z_-]{8}")
self.assertRegex(d.short_id, r"[0-9A-Za-z_-]{8}")