<s> import pytest <EOL> from cookiecutter import main <EOL> @ pytest . fixture <EOL> def context ( ) : <EOL> """<STR_LIT>""" <EOL> return { <EOL> u'<STR_LIT>' : { <EOL> u'<STR_LIT:email>' : u'<STR_LIT>' , <EOL> u'<STR_LIT>' : u'<STR_LIT>' , <EOL> u'<STR_LIT>' : u'<STR_LIT>' , <EOL> u'<STR_LIT:version>' : u'<STR_LIT>' , <EOL> } <EOL> } <EOL> @ pytest . fixture <EOL> def output_dir ( tmpdir ) : <EOL> return str ( tmpdir . mkdir ( '<STR_LIT>' ) ) <EOL> @ pytest . fixture <EOL> def template ( tmpdir ) : <EOL> return str ( tmpdir . mkdir ( '<STR_LIT>' ) ) <EOL> @ pytest . fixture ( autouse = True ) <EOL> def mock_gen_context ( mocker , context ) : <EOL> mocker . patch ( '<STR_LIT>' , return_value = context ) <EOL> @ pytest . fixture ( autouse = True ) <EOL> def mock_prompt ( mocker ) : <EOL> mocker . patch ( '<STR_LIT>' ) <EOL> @ pytest . fixture ( autouse = True ) <EOL> def mock_replay ( mocker ) : <EOL> mocker . patch ( '<STR_LIT>' ) <EOL> def test_api_invocation ( mocker , template , output_dir , context ) : <EOL> mock_gen_files = mocker . patch ( '<STR_LIT>' ) <EOL> main . cookiecutter ( template , output_dir = output_dir ) <EOL> mock_gen_files . assert_called_once_with ( <EOL> repo_dir = template , <EOL> context = context , <EOL> overwrite_if_exists = False , <EOL> output_dir = output_dir <EOL> ) <EOL> def test_default_output_dir ( mocker , template , context ) : <EOL> mock_gen_files = mocker . patch ( '<STR_LIT>' ) <EOL> main . cookiecutter ( template ) <EOL> mock_gen_files . assert_called_once_with ( <EOL> repo_dir = template , <EOL> context = context , <EOL> overwrite_if_exists = False , <EOL> output_dir = '<STR_LIT:.>' <EOL> ) </s>
