File python-django-waliki-python3.12.patch of Package python-django-waliki

From cc90067c8625ee0d910f3509cb6e8a488b92620c Mon Sep 17 00:00:00 2001
From: Oleg Girko <ol@infoserver.lv>
Date: Tue, 17 Oct 2023 23:13:14 +0100
Subject: [PATCH] Fix compaibility with Python 3.12.

* The unittest.TestCase class has no assertRegexpMatches() method.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
---
 tests/test_git.py         | 3 +++
 tests/test_git_webhook.py | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/tests/test_git.py b/tests/test_git.py
index dd17a6f..4a9d9d1 100644
--- a/tests/test_git.py
+++ b/tests/test_git.py
@@ -18,6 +18,9 @@ git = git.bake("--no-pager", _tty_out=False, _encoding='UTF-8')
 
 class TestGit(TestCase):
 
+    if not hasattr(TestCase, 'assertRegexpMatches'):
+        assertRegexpMatches = TestCase.assertRegex
+
     def setUp(self):
         self.page = PageFactory()
         self.edit_url = reverse('waliki_edit', args=(self.page.slug,))
diff --git a/tests/test_git_webhook.py b/tests/test_git_webhook.py
index ddba324..7594d6f 100644
--- a/tests/test_git_webhook.py
+++ b/tests/test_git_webhook.py
@@ -17,6 +17,9 @@ git = git.bake("--no-pager", _tty_out=False)
 
 class TestGitWebhook(TestCase):
 
+    if not hasattr(TestCase, 'assertRegexpMatches'):
+        assertRegexpMatches = TestCase.assertRegex
+
     def setUp(self):
         self.content = "- item"
         self.page = PageFactory(path="page.rst", raw=self.content)
-- 
2.41.0