In a testing class, I want to get all the objects of a given type; this alwaus give an emty set
from Dictionnaire.models import Entree class Test(TestCase): def setUp(self): ... Q=Entree.objects.all() print(Q.count()) <------always get 0.
Aucun commentaire:
Enregistrer un commentaire