fix: allow session injection for ObjectRef constructor
for sake of simpler tests
This commit is contained in:
parent
7895ce4676
commit
2de08ad50d
|
@ -250,12 +250,13 @@ class ObjectRef(colander.SchemaType):
|
|||
*args,
|
||||
**kwargs,
|
||||
):
|
||||
# nb. allow session injection for tests
|
||||
self.session = kwargs.pop('session', Session())
|
||||
super().__init__(*args, **kwargs)
|
||||
self.request = request
|
||||
self.config = self.request.wutta_config
|
||||
self.app = self.config.get_app()
|
||||
self.model_instance = None
|
||||
self.session = Session()
|
||||
|
||||
if empty_option:
|
||||
if empty_option is True:
|
||||
|
|
Loading…
Reference in a new issue