  
      @skipIfDBFeature('supports_timezones')
      def test_aware_datetime_unsupported(self):
          dt = datetime.datetime(2011, 9, 1, 13, 20, 30, tzinfo=EAT)
          with self.assertRaises(ValueError):
              Event.objects.create(dt=dt)
  
      def test_auto_now_and_auto_now_add(self):
          now = datetime.datetime.now()
          past = now - datetime.timedelta(seconds=2)
 
</s> remove         with self.assertRaises(ValueError):
 </s> add         with self.assertRaisesMessage(ValueError, self.msg % 'accounts'): </s> remove         with self.assertRaises(ValueError):
 </s> add         with self.assertRaisesMessage(ValueError, self.msg % 'first_name'): </s> remove         with self.assertRaises(ValueError):
 </s> add         msg = 'F(ceo)": "Company.point_of_contact" must be a "Employee" instance.'
        with self.assertRaisesMessage(ValueError, msg): </s> remove         with self.assertRaises(ValueError):
 </s> add         msg = "The annotation 'age' conflicts with a field on the model."
        with self.assertRaisesMessage(ValueError, msg): </s> remove         with self.assertRaises(ValueError):
 </s> add         msg = "The annotation 'book_contact_set' conflicts with a field on the model."
        with self.assertRaisesMessage(ValueError, msg):
        msg = 'backend does not support timezone-aware datetimes when USE_TZ is False.'
        with self.assertRaisesMessage(ValueError, msg):
  
      @skipIfDBFeature('supports_timezones')
      def test_aware_datetime_unsupported(self):
          dt = datetime.datetime(2011, 9, 1, 13, 20, 30, tzinfo=EAT)
        msg = 'backend does not support timezone-aware datetimes when USE_TZ is False.'
        with self.assertRaisesMessage(ValueError, msg):
              Event.objects.create(dt=dt)
  
      def test_auto_now_and_auto_now_add(self):
          now = datetime.datetime.now()
          past = now - datetime.timedelta(seconds=2)
keep keep keep keep replace keep keep keep keep keep
 Used assertRaisesMessage() to test Django's error messages. 
tests/timezones/tests.py