Skip to content

Commit 3e817db

Browse files
committed
Revert not needed black check.
1 parent 470cdf8 commit 3e817db

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tests/model_fields_/test_objectidfield.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
import shutil
2-
31
from bson import ObjectId
42
from django.core import exceptions
53
from django.test import SimpleTestCase
64

75
from django_mongodb.fields import ObjectIdField
86

9-
HAS_BLACK = shutil.which("black")
10-
117

128
class MethodTests(SimpleTestCase):
139
def test_deconstruct(self):
@@ -33,9 +29,6 @@ def test_to_python(self):
3329
def test_to_python_invalid_value(self):
3430
for invalid_value in [3, "None", {}, []]:
3531
with self.subTest(invalid_value=invalid_value):
36-
if HAS_BLACK:
37-
msg = f'["“{invalid_value}” value must be an Object Id."]'
38-
else:
39-
msg = f"['“{invalid_value}” value must be an Object Id.']"
32+
msg = f"['“{invalid_value}” value must be an Object Id.']"
4033
with self.assertRaisesMessage(exceptions.ValidationError, msg):
4134
ObjectIdField().to_python(invalid_value)

0 commit comments

Comments
 (0)