def test_import_env(self):
    with mktemp('{{ a }}/{{ env.B }}') as template:
        with mktemp('{"a":1}') as context:
            self._testme(['--format=json', '--import-env=env', template, context], '1/2', env=dict(B='2'))
    with mktemp('{{ a }}/{{ B }}') as template:
        with mktemp('{"a":1,"B":1}') as context:
            self._testme(['--format=json', '--import-env=', template, context], '1/2', env=dict(B='2'))
def test_import_env(self):
    with mktemp('{{ a }}/{{ env.B }}') as template:
        with mktemp('{"a":1}') as context:
            self._testme(['--format=json', '--import-env=env', template, context], '1/2', env=dict(B='2'))
    with mktemp('{{ a }}/{{ B }}') as template:
        with mktemp('{"a":1,"B":1}') as context:
            self._testme(['--format=json', '--import-env=', template, context], '1/2', env=dict(B='2'))