@patch('failnozzle.server.FileSystemLoader')
# jinja2.environement.Environment
@patch('failnozzle.server.Environment')
@patch.multiple('failnozzle.settings',
                EMAIL_TEMPLATE_DIR=CUSTOM_TEMP_DIR,
                EMAIL_SUBJECT_TEMPLATE=CUSTOM_SUBJECT_TEMP,
                EMAIL_BODY_TEMPLATE=CUSTOM_BODY_TEMP,
                create=True)
def test_customization_tmpl(env_mock, fs_loader_mock):
    # Get the Environment instance mock.
    env_inst = env_mock.return_value

    _, _, _ = _create_queue_rate_buffer()

    # Make sure we loaded the expected templates from the expected place.
    fs_loader_mock.assert_called_once_with(CUSTOM_TEMP_DIR)
    env_inst.get_template.assert_called_with(CUSTOM_SUBJECT_TEMP)
    env_inst.get_template.assert_called_with(CUSTOM_BODY_TEMP)
Ensure that we can customize the templates used for send mail.
dataset/ETHPy150Open wingu/failnozzle/failnozzle/tests/test_customization.py/test_customization_tmpl