'Test that update queries do not generate non-necessary queries.
Refs #18304.'

def test_update_query_counts(self):

    c = Chef.objects.create(name=u'Albert')
    ir = ItalianRestaurant.objects.create(name=u'Ristorante    Miron', address=u'1234    W.    Ash', serves_hot_dogs=False, serves_pizza=False, serves_gnocchi=True, rating=4, chef=c)
    with self.assertNumQueries(3):
        ir.save()
