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))
def setUp(self): load.members() self.recent_bills = get_recent_bills()
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())
def test_bill_count(self): recent = get_recent_bills() self.assertEqual(len(recent), Bill.objects.count())