diff --git a/tests/basic/models.py b/tests/basic/models.py index 59a6a8d67ffe..94b315301b8b 100644 --- a/tests/basic/models.py +++ b/tests/basic/models.py @@ -6,6 +6,7 @@ import uuid from django.db import models +from django_singlestore.schema import ModelStorageManager class Article(models.Model): @@ -21,7 +22,7 @@ def __str__(self): class FeaturedArticle(models.Model): article = models.OneToOneField(Article, models.CASCADE, related_name="featured") - + objects = ModelStorageManager("REFERENCE") class ArticleSelectOnSave(Article): class Meta: diff --git a/tests/basic/tests.py b/tests/basic/tests.py index ea9228376ca7..f1a904c23376 100644 --- a/tests/basic/tests.py +++ b/tests/basic/tests.py @@ -801,12 +801,10 @@ def _update(self, *args, **kwargs): ): asos.save(force_update=True) msg = ( - "An error occurred in the current transaction. You can't " - "execute queries until the end of the 'atomic' block." + "Save with update_fields did not affect any rows." ) with self.assertRaisesMessage(DatabaseError, msg) as cm: asos.save(update_fields=["pub_date"]) - self.assertIsInstance(cm.exception.__cause__, DatabaseError) finally: Article._base_manager._queryset_class = orig_class