Beispiel #1
0
 def test_queryset_read(self):
     found = False
     index = InstitutionIndex()
     for obj in index.read_queryset():
         found = True
         self.assertFalse(hasattr(obj, 'num_loans'))
     self.assertTrue(found)
Beispiel #2
0
 def test_queryset_read(self):
     found = False
     index = InstitutionIndex()
     for obj in index.read_queryset():
         found = True
         self.assertFalse(hasattr(obj, 'num_loans'))
     self.assertTrue(found)
Beispiel #3
0
 def test_queryset_num_loans(self):
     found1, found2 = False, False
     index = InstitutionIndex()
     for obj in index.index_queryset():
         if obj.respondent_id == '9876543210':
             found1 = True
             self.assertEqual(obj.num_loans, 1)
         elif obj.respondent_id == '0123456789':
             found2 = True
     self.assertTrue(found1)
     self.assertFalse(found2)
Beispiel #4
0
 def test_queryset_num_loans(self):
     found1, found2 = False, False
     index = InstitutionIndex()
     for obj in index.index_queryset():
         if obj.respondent_id == '9876543210':
             found1 = True
             self.assertEqual(obj.num_loans, 1)
         elif obj.respondent_id == '0123456789':
             found2 = True
     self.assertTrue(found1)
     self.assertFalse(found2)