              asos.save()
          with self.assertNumQueries(1):
              asos.save(force_update=True)
          Article.objects.all().delete()
          with self.assertRaises(DatabaseError):
              with self.assertNumQueries(1):
                  asos.save(force_update=True)
  
      def test_select_on_save_lying_update(self):
          """
 
</s> remove             with self.assertRaises(DatabaseError):
 </s> add             with self.assertRaisesMessage(DatabaseError, 'Forced update did not affect any rows.'): </s> remove             with self.assertRaises(DatabaseError):
 </s> add             msg = (
                "An error occurred in the current transaction. You can't "
                "execute queries until the end of the 'atomic' block."
            )
            with self.assertRaisesMessage(DatabaseError, msg): </s> remove         with self.assertRaises(ImproperlyConfigured):
 </s> add         msg = "'apps.apps.BadConfig' must supply a name attribute."
        with self.assertRaisesMessage(ImproperlyConfigured, msg): </s> remove         with self.assertRaises(TypeError):
 </s> add         with self.assertRaisesMessage(TypeError, msg): </s> remove         with self.assertRaises(ImproperlyConfigured):
 </s> add         msg = "'apps.apps.NotAConfig' isn't a subclass of AppConfig."
        with self.assertRaisesMessage(ImproperlyConfigured, msg):
        with self.assertRaisesMessage(DatabaseError, 'Forced update did not affect any rows.'):
              asos.save()
          with self.assertNumQueries(1):
              asos.save(force_update=True)
          Article.objects.all().delete()
        with self.assertRaisesMessage(DatabaseError, 'Forced update did not affect any rows.'):
              with self.assertNumQueries(1):
                  asos.save(force_update=True)
  
      def test_select_on_save_lying_update(self):
          """
keep keep keep keep replace keep keep keep keep keep
 Used assertRaisesMessage() to test Django's error messages. 
tests/basic/tests.py