def load_config(self): self.notifiers = notifiers.init(vars(settings._wrapped)) self.whitelist = [ DjangoRule(**item) for item in getattr(settings, 'NPLUSONE_WHITELIST', []) ]
def load_config(self, app): self.notifiers = notifiers.init(app.config) self.whitelist = [ listeners.Rule(**item) for item in app.config.get('NPLUSONE_WHITELIST', []) ]
def __init__(self, app): self.app = app self.notifiers = notifiers.init(self.app.config) self.init_app()
def test_many_to_many_raise(self, app, wrapper, objects, client, logger): app.config['NPLUSONE_RAISE'] = True wrapper.notifiers = notifiers.init(app.config) res = client.get('/many_to_many/', expect_errors=True) assert res.status_code == 500
def load_config(self): self.notifiers = notifiers.init(self.app.config) self.whitelist = [ listeners.Rule(**item) for item in self.app.config.get('NPLUSONE_WHITELIST', []) ]
def load_config(self): self.notifiers = notifiers.init(self.app.config) self.whitelist = [ listeners.Rule(**item) for item in self.app.config.get("NPLUSONE_WHITELIST", []) ]