diff --git a/tests/model_fields_/test_objectidfield.py b/tests/model_fields_/test_objectidfield.py index af86c279..7889ea47 100644 --- a/tests/model_fields_/test_objectidfield.py +++ b/tests/model_fields_/test_objectidfield.py @@ -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): @@ -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)