def setUp(self):
        super(TestRenderErrors, self).setUp()
        AppStatus.create()
        self.codes = [401, 403, 404, 413, 500]

        for i in self.codes:
            self.client.application.add_url_rule('/' + str(i), str(i),
                                                 self.build_rule(i))
    def setUp(self):
        super(TestRenderErrors, self).setUp()
        AppStatus.create()
        self.codes = [401, 403, 404, 413, 500]

        for i in self.codes:
            self.client.application.add_url_rule(
                '/' + str(i), str(i), self.build_rule(i)
            )
 def test_beacon_biweekly_correct_opportunities(self):
     AppStatus.create(last_beacon_newsletter=self.yesterday)
     biweekly = BeaconBiweeklyDigestJob()
     opportunities = biweekly.get_opportunities()
     self.assertEquals(len(opportunities), 1)