def test_django_model(model): connection.close() # Ensure clean connection list(model.objects.all()[:5])