def test_integers(self):
    'Adding an integer as a tag should raise a ValueError (#237).'
    apple = self.food_model.objects.create(name='apple')
    with self.assertRaisesRegexp(ValueError, "Cannot add 1 \\(<(type|class) 'int'>\\). Expected <class 'django.db.models.base.ModelBase'> or str."):
        apple.tags.add(1)
Adding an integer as a tag should raise a ValueError (#237).
def test_integers(self):
    
    apple = self.food_model.objects.create(name='apple')
    with self.assertRaisesRegexp(ValueError, "Cannot add 1 \\(<(type|class) 'int'>\\). Expected <class 'django.db.models.base.ModelBase'> or str."):
        apple.tags.add(1)