Skip to content

Commit

Permalink
edi_oca: tests.common ease ctx setup
Browse files Browse the repository at this point in the history
  • Loading branch information
simahawk committed Oct 10, 2023
1 parent f62bea2 commit 4c94830
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions edi_oca/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@

class EDIBackendTestMixin(object):
@classmethod
def _setup_context(cls):
def _setup_context(cls, **kw):
return dict(
cls.env.context, tracking_disable=True, test_queue_job_no_delay=True
cls.env.context, tracking_disable=True, test_queue_job_no_delay=True, **kw
)

@classmethod
def _setup_env(cls):
cls.env = cls.env(context=cls._setup_context())
def _setup_env(cls, ctx=None):
ctx = ctx or {}
cls.env = cls.env(context=cls._setup_context(**ctx))

@classmethod
def _setup_records(cls):
Expand Down

0 comments on commit 4c94830

Please sign in to comment.