def test_settings(self): # services.verify is not a real django app, it imports django settings # manually, so we can't simply use self.settings() context manager. # See https://bugzilla.mozilla.org/show_bug.cgi?id=1159746 with mock.patch('services.verify.settings') as settings: settings.SIGNING_SERVER_ACTIVE = True eq_(verify.status_check({})[0], 200) with mock.patch('services.verify.settings') as settings: settings.SIGNING_SERVER_ACTIVE = False eq_(verify.status_check({})[0], 500)
def test_wrong_settings(self): with self.settings(SIGNING_SERVER_ACTIVE=''): eq_(verify.status_check({})[0], 500)