@@ -260,15 +260,13 @@ def django_test_expected_failures(self):
260260 "MongoDB does not support this database function." : {
261261 "db_functions.math.test_sign.SignTests" ,
262262 "db_functions.text.test_chr.ChrTests" ,
263- "db_functions.text.test_md5.MD5Tests" ,
264263 "db_functions.text.test_ord.OrdTests" ,
265264 "db_functions.text.test_pad.PadTests" ,
266265 "db_functions.text.test_repeat.RepeatTests" ,
267266 "db_functions.text.test_reverse.ReverseTests" ,
268267 "db_functions.text.test_right.RightTests" ,
269268 "db_functions.text.test_sha1.SHA1Tests" ,
270269 "db_functions.text.test_sha224.SHA224Tests" ,
271- "db_functions.text.test_sha256.SHA256Tests" ,
272270 "db_functions.text.test_sha384.SHA384Tests" ,
273271 "db_functions.text.test_sha512.SHA512Tests" ,
274272 },
@@ -460,6 +458,15 @@ def django_test_expected_failures(self):
460458 def django_test_skips (self ):
461459 skips = super ().django_test_skips
462460 skips .update (self ._django_test_skips )
461+ if not self .is_mongodb_8_3 :
462+ skips .update (
463+ {
464+ "MD5 and SHA256 functions required MongoDB 8.3.+." : {
465+ "db_functions.text.test_md5.MD5Tests" ,
466+ "db_functions.text.test_sha256.SHA256Tests" ,
467+ }
468+ }
469+ )
463470 return skips
464471
465472 # Tests that are expected to raise certain exceptions:
@@ -767,6 +774,10 @@ def mongodb_version(self):
767774 def is_mongodb_8_0 (self ):
768775 return self .mongodb_version >= (8 , 0 )
769776
777+ @cached_property
778+ def is_mongodb_8_3 (self ):
779+ return self .mongodb_version >= (8 , 3 )
780+
770781 @cached_property
771782 def supports_search (self ):
772783 """Does the server support MongoDB search queries and indexes?"""
0 commit comments