Projet

Général

Profil

Development #52649

test_delete_tenant_with_sql trop fragile

Ajouté par Frédéric Péters il y a environ 3 ans. Mis à jour il y a environ 3 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
02 avril 2021
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

La procédure renomme une base en mettant un timestamp dedans, et le code du test est générique à vérifier de manière très/trop large,

    cur.execute(
        """SELECT datname
                   FROM pg_database
                   WHERE datname like '%removed%'""" 
    )

il y aurait peut-être à y utiliser freezetime, ou mocker le datetime.now(), pour assurer une valeur reproductible, qui pourrait alors être vérifiée de manière précise.


Fichiers

Révisions associées

Révision f3eb47d6 (diff)
Ajouté par Frédéric Péters il y a environ 3 ans

tests: check against specific db name in test_delete_tenant_with_sql (#52649)

Historique

#1

Mis à jour par Frédéric Péters il y a environ 3 ans

qqch comme ça.

#2

Mis à jour par Lauréline Guérin il y a environ 3 ans

  • Statut changé de Solution proposée à Solution validée
#3

Mis à jour par Frédéric Péters il y a environ 3 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit f3eb47d6f37ddd1eeddc9b275d06bddf8333a1d2
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Fri Apr 2 10:56:17 2021 +0200

    tests: check against specific db name in test_delete_tenant_with_sql (#52649)
#4

Mis à jour par Frédéric Péters il y a environ 3 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF