          """Regression test for #8354: the MySQL and Oracle backends should raise
          an error if given a timezone-aware datetime object."""
          dt = datetime.datetime(2008, 8, 31, 16, 20, tzinfo=utc)
          d = Donut(name='Bear claw', consumed_at=dt)
          self.assertRaises(ValueError, d.save)
          # ValueError: MySQL backend does not support timezone-aware datetimes.
  
      def test_datefield_auto_now_add(self):
          """Regression test for #10970, auto_now_add for DateField should store
          a Python datetime.date, not a datetime.datetime"""
          b = RumBaba.objects.create()
 
</s> remove         self.assertRaises(ValueError, City.objects.get, point__exact=htown.point)
 </s> add         with self.assertRaises(ValueError):
            City.objects.get(point__exact=htown.point) </s> remove         self.assertRaises(ValueError, Country.objects.filter, mpoly__relate=(23, 'foo'))
 </s> add         with self.assertRaises(ValueError):
            Country.objects.filter(mpoly__relate=(23, 'foo')) </s> remove         self.assertRaises(ValueError, City.objects.filter(point__contained=z.poly).count)
 </s> add         with self.assertRaises(ValueError):
            City.objects.filter(point__contained=z.poly).count() </s> remove         self.assertRaises(ValueError, City.objects.filter(point__within=z.poly).count)
 </s> add         with self.assertRaises(ValueError):
            City.objects.filter(point__within=z.poly).count() </s> remove         self.assertRaises(ValueError, qs.aggregate, Union('name'))
 </s> add         with self.assertRaises(ValueError):
            qs.aggregate(Union('name'))
        # MySQL backend does not support timezone-aware datetimes.
        with self.assertRaises(ValueError):
            d.save()
          """Regression test for #8354: the MySQL and Oracle backends should raise
          an error if given a timezone-aware datetime object."""
          dt = datetime.datetime(2008, 8, 31, 16, 20, tzinfo=utc)
          d = Donut(name='Bear claw', consumed_at=dt)
        # MySQL backend does not support timezone-aware datetimes.
        with self.assertRaises(ValueError):
            d.save()
        # MySQL backend does not support timezone-aware datetimes.
        with self.assertRaises(ValueError):
            d.save()
  
      def test_datefield_auto_now_add(self):
          """Regression test for #10970, auto_now_add for DateField should store
          a Python datetime.date, not a datetime.datetime"""
          b = RumBaba.objects.create()
keep keep keep keep replace replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/datatypes/tests.py