8000 fix: Add hash method to FizzyInt for testing · django-cms/django-cms@dcecb46 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit dcecb46

Browse files
committed
fix: Add hash method to FizzyInt for testing
1 parent af81f1e commit dcecb46

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cms/test_utils/util/fuzzy_int.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ def __eq__(self, other):
1212

1313
def __repr__(self):
1414
return "[%d..%d]" % (self.lowest, self.highest)
15+
16+
def __hash__(self):
17+
return hash((self.lowest, self.highest))

cms/tests/test_grouper_admin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from django.contrib.admin import site
44
from django.templatetags.static import static
55
from django.utils.crypto import get_random_string
6+
from django.utils.translation import get_language, override as force_language
67

78
from cms.admin.utils import CONTENT_PREFIX
89
from cms.test_utils.project.sampleapp.models import (
@@ -13,7 +14,7 @@
1314
)
1415
from cms.test_utils.testcases import CMSTestCase
1516
from cms.test_utils.util.grouper import wo_content_permission
16-
from cms.utils.i18n import force_language, get_language_list
17+
from cms.utils.i18n import get_language_list
1718
from cms.utils.urlutils import admin_reverse, static_with_version
1819

1920

0 commit comments

Comments
 (0)
0