Esempio n. 1
0
 def test_bills_loaded(self):
     failed = []
     for bill_uri in get_recent_bills():
         try:
             Bill.objects.get(nyt_uri__iexact=bill_uri)
         except Bill.DoesNotExist:
             failed.append(bill_uri)
     
     if failed:
         self.fail('\n'.join(failed))
Esempio n. 2
0
 def setUp(self):
     load.members()
     self.recent_bills = get_recent_bills()
Esempio n. 3
0
 def test_double_load(self):
     # bills are loaded in setUp, so load again
     recent = get_recent_bills()
     load_bills()
     self.assertEqual(len(recent), Bill.objects.count())
Esempio n. 4
0
 def test_bill_count(self):
     recent = get_recent_bills()
     self.assertEqual(len(recent), Bill.objects.count())