Skip to content

Commit

Permalink
ci: run tests also with Python 3.12
Browse files Browse the repository at this point in the history
The `assertEquals` unittest alias has been deprecated in 3.2 and removed
in 3.12, so we change it to `assertEqual`.

Closes: #411
  • Loading branch information
b1rger committed Nov 14, 2023
1 parent 87834b3 commit d87c0fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/django-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
6 changes: 3 additions & 3 deletions apis_core/apis_metainfo/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ def setUp(cls):
def test_root_object(self):
rfoo = RootObject.objects.get(name="foo")
rnone = RootObject.objects.get(name="")
self.assertEquals(str(rfoo), "foo")
self.assertEquals(str(rnone), "no name provided")
self.assertEqual(str(rfoo), "foo")
self.assertEqual(str(rnone), "no name provided")

def test_uri(self):
ufoo = Uri.objects.create()
self.assertEquals(str(ufoo), "None")
self.assertEqual(str(ufoo), "None")

0 comments on commit d87c0fd

Please sign in to comment.