Skip to content

Commit

Permalink
Use assertNotEqual instead of its deprecated alias
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlence committed Dec 16, 2024
1 parent fdfac55 commit 604bddf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions django_uidfield/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def db_for_write(self, model, **hints):
class CheckMixin:
def _check_field_value(self, value):
self.assertEqual(len(value), 20)
self.assertNotEquals(FIELD_RE.match(value), None)
self.assertNotEqual(FIELD_RE.match(value), None)


class UIDFieldTest(CheckMixin, TestCase):
Expand All @@ -67,7 +67,7 @@ def test_uid_field_value_regeneration(self):
second_obj = TestModel(uid_field=first_obj.uid_field)
second_obj.save()
self._check_field_value(second_obj.uid_field)
self.assertNotEquals(first_obj.uid_field, second_obj.uid_field)
self.assertNotEqual(first_obj.uid_field, second_obj.uid_field)

def test_uidfield_as_pk(self):
"""Test usage of UIDField as primary key"""
Expand Down Expand Up @@ -95,7 +95,7 @@ def test_uid_recreation_with_explicit_routing(self):
second_obj = TestModel(uid_field=first_obj.uid_field)
second_obj.save(using=db)
self._check_field_value(second_obj.uid_field)
self.assertNotEquals(first_obj.uid_field, second_obj.uid_field)
self.assertNotEqual(first_obj.uid_field, second_obj.uid_field)

def test_uid_recreation_with_route_based_routing(self):
"""
Expand All @@ -113,4 +113,4 @@ def test_uid_recreation_with_route_based_routing(self):
second_obj = TestModel(uid_field=first_obj.uid_field)
second_obj.save()
self._check_field_value(second_obj.uid_field)
self.assertNotEquals(first_obj.uid_field, second_obj.uid_field)
self.assertNotEqual(first_obj.uid_field, second_obj.uid_field)

0 comments on commit 604bddf

Please sign in to comment.