          self.assertEqual(1, qs.count())
  
      def test_generic_relation_related_name_default(self):
          # GenericRelation isn't usable from the reverse side by default.
          with self.assertRaises(FieldError):
              TaggedItem.objects.filter(vegetable__isnull=True)
  
      def test_multiple_gfk(self):
          # Simple tests for multiple GenericForeignKeys
          # only uses one model, since the above tests should be sufficient.
 
</s> remove         with self.assertRaises(CommandError):
 </s> add         msg = "Aborting password change for user 'joe' after 3 attempts"
        with self.assertRaisesMessage(CommandError, msg): </s> remove         with self.assertRaises(DatabaseError):
 </s> add         msg = 'Forced update did not affect any rows.'
        with self.assertRaisesMessage(DatabaseError, msg): </s> remove         with self.assertRaises(ValueError):
 </s> add         msg = 'Trying to compare non-ordered queryset against more than one ordered values'
        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): </s> remove         with self.assertRaises(NotImplementedError):
 </s> add         with self.assertRaisesMessage(NotImplementedError, msg):
        msg = (
            "Cannot resolve keyword 'vegetable' into field. Choices are: "
            "animal, content_object, content_type, content_type_id, id, "
            "manualpk, object_id, tag, valuabletaggeditem"
        )
        with self.assertRaisesMessage(FieldError, msg):
          self.assertEqual(1, qs.count())
  
      def test_generic_relation_related_name_default(self):
          # GenericRelation isn't usable from the reverse side by default.
        msg = (
            "Cannot resolve keyword 'vegetable' into field. Choices are: "
            "animal, content_object, content_type, content_type_id, id, "
            "manualpk, object_id, tag, valuabletaggeditem"
        )
        with self.assertRaisesMessage(FieldError, msg):
              TaggedItem.objects.filter(vegetable__isnull=True)
  
      def test_multiple_gfk(self):
          # Simple tests for multiple GenericForeignKeys
          # only uses one model, since the above tests should be sufficient.
keep keep keep keep replace keep keep keep keep keep
 Used assertRaisesMessage() to test Django's error messages. 
tests/generic_relations/tests.py