def test_temporary_docker_directory_quotes_args():
    with tempfile.TemporaryDirectory() as td:
        os.chdir(td)
        with open('hello', 'w') as fp:
            fp.write('world')
        with utils.temporary_docker_directory(files=['hello'], name='t', metadata=None, extra_options='--$HOME', branch=None, template_dir=None, plugins_dir=None, static=[], install=[], spatialite=False, version_note='$PWD', secret='secret') as temp_docker:
            df = os.path.join(temp_docker, 'Dockerfile')
            with open(df) as fp:
                df_contents = fp.read()
            assert ("'$PWD'" in df_contents)
            assert ("'--$HOME'" in df_contents)
            assert ("ENV DATASETTE_SECRET 'secret'" in df_contents)
def test_temporary_docker_directory_quotes_args():
    with tempfile.TemporaryDirectory() as td:
        os.chdir(td)
        with open('hello', 'w') as fp:
            fp.write('world')
        with utils.temporary_docker_directory(files=['hello'], name='t', metadata=None, extra_options='--$HOME', branch=None, template_dir=None, plugins_dir=None, static=[], install=[], spatialite=False, version_note='$PWD', secret='secret') as temp_docker:
            df = os.path.join(temp_docker, 'Dockerfile')
            with open(df) as fp:
                df_contents = fp.read()
            assert ("'$PWD'" in df_contents)
            assert ("'--$HOME'" in df_contents)
            assert ("ENV DATASETTE_SECRET 'secret'" in df_contents)