Skip to content

Commit ccdae65

Browse files
committed
Fix message
1 parent 767098f commit ccdae65

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
### Unreleased
44

5+
### 0.4.1
6+
7+
- Fix message for *field-verbose-name-gettext-case*
8+
59
### 0.4.0
610

711
- Add infra for rest framework serializers checks

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = django-extra-checks
3-
version = 0.4.0
3+
version = 0.4.1
44
author = Konstantin Alekseev
55
author_email = [email protected]
66
description = Collection of useful checks for Django Checks Framework

src/extra_checks/checks/model_field_checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def apply(
8080
if not all(
8181
w.islower() or w.isupper() or w.isdigit() for w in value.split(" ")
8282
):
83-
yield django.core.checks.Warning(
83+
yield self.message(
8484
"Words in verbose name must be all upper case or all lower case.",
8585
hint='Change verbose name to "{}".'.format(value.lower()),
8686
obj=field,

tests/test_model_field_checks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def test_check_field_verbose_name_gettext_case(test_case):
6161
assert {m.obj.name for m in messages} == {
6262
"gettext_case",
6363
}
64+
assert messages[0].id == model_field_checks.CheckFieldVerboseNameGettextCase.Id.name
6465

6566

6667
def test_check_field_file_upload_to(test_case):

0 commit comments

Comments
 (0)