Change client to session in tests