def test_new_delayed_construction_with_default(self): app = Flask(__name__) ext = KVSessionExtension(self.store) ext.init_app(app) self.assertIs(self.store, app.kvsession_store)
def test_new_delayed_construction(self): app = Flask(__name__) ext = KVSessionExtension() with self.assertRaises(ValueError): ext.init_app(app) ext.init_app(app, self.store) self.assertIs(self.store, app.kvsession_store)