Skip to content

Commit 20a5865

Browse files
committed
try another formulation
1 parent 45334e0 commit 20a5865

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

tests/support/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
from tests.support.fixturesupp import _PreparedFixture
4646
from tests.support.suppconst import MIG_BASE, TEST_BASE, \
4747
TEST_DATA_DIR, TEST_OUTPUT_DIR, ENVHELP_OUTPUT_DIR
48-
import tests.support.fakes as fakes
48+
from tests.support.fakes import make_fake_assistants
4949

5050
from tests.support._env import MIG_ENV, PY2
5151

@@ -227,10 +227,7 @@ def _make_configuration_instance(testcase, configuration_to_make):
227227
from mig.shared.conf import get_configuration_object, RuntimeConfiguration
228228
configuration = get_configuration_object(skip_log=True, disable_auth_log=True, raw=True)
229229

230-
assistants = {
231-
'send_email': fakes.make_fake_send_email(mig_test_case=testcase),
232-
}
233-
230+
assistants = make_fake_assistants()
234231
return RuntimeConfiguration.create(configuration, assistants)
235232
else:
236233
raise AssertionError(

tests/support/fakes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,9 @@ def make_fake_send_email(mig_test_case=None):
7878
mig_test_case._register_check(fake_send_email.check_empty_and_reset)
7979

8080
return fake_send_email
81+
82+
83+
def make_fake_assistants(mig_test_case=None):
84+
return {
85+
'send_email': make_fake_send_email(mig_test_case=mig_test_case),
86+
}

0 commit comments

Comments
 (0)