From f6f260f97df29500a531baf1b370c3e4e4f3dc76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
Date: Thu, 23 Mar 2023 13:23:12 +0100
Subject: [PATCH] Replace TestCase method aliases removed in Python 3.12

Fixes: #568
---
 CONTRIBUTORS.md | 1 +
 fs/test.py      | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 78102487..bd1efc01 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -41,6 +41,7 @@ Many thanks to the following developers for contributing to this project:
 - [@sqwishy](https://github.com/sqwishy)
 - [Sven Schliesing](https://github.com/muffl0n)
 - [Thomas Feldmann](https://github.com/tfeldmann)
+- [Tomáš Hrnčiar](https://github.com/hrnciar)
 - [Tim Gates](https://github.com/timgates42/)
 - [@tkossak](https://github.com/tkossak)
 - [Todd Levi](https://github.com/televi)
diff --git a/fs/test.py b/fs/test.py
index 32e6ea5c..9bfe811d 100644
--- a/fs/test.py
+++ b/fs/test.py
@@ -1082,7 +1082,7 @@ def test_remove(self):
         self.fs.makedirs("foo/bar/baz/")
 
         error_msg = "resource 'foo/bar/egg/test.txt' not found"
-        assertRaisesRegex = getattr(self, "assertRaisesRegex", self.assertRaisesRegexp)
+        assertRaisesRegex = getattr(self, "assertRaisesRegex", self.assertRaisesRegex)
         with assertRaisesRegex(errors.ResourceNotFound, error_msg):
             self.fs.remove("foo/bar/egg/test.txt")
 
