Skip to content

Commit

Permalink
Revert not needed black check.
Browse files Browse the repository at this point in the history
  • Loading branch information
WaVEV committed Nov 20, 2024
1 parent f3360ca commit f5094fe
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions tests/model_fields_/test_objectidfield.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import shutil

from bson import ObjectId
from django.core import exceptions
from django.test import SimpleTestCase

from django_mongodb.fields import ObjectIdField

HAS_BLACK = shutil.which("black")


class MethodTests(SimpleTestCase):
def test_deconstruct(self):
Expand All @@ -33,9 +29,6 @@ def test_to_python(self):
def test_to_python_invalid_value(self):
for invalid_value in [3, "None", {}, []]:
with self.subTest(invalid_value=invalid_value):
if HAS_BLACK:
msg = f'["“{invalid_value}” value must be an Object Id."]'
else:
msg = f"['“{invalid_value}” value must be an Object Id.']"
msg = f"['“{invalid_value}” value must be an Object Id.']"
with self.assertRaisesMessage(exceptions.ValidationError, msg):
ObjectIdField().to_python(invalid_value)

0 comments on commit f5094fe

Please sign in to comment.