def test_init_template(init_basic, init_template, mock_join): ''' couchapp init -t app /mock_dir ''' commands.init(None, '/mock_dir', empty=False, template='app') assert not init_basic.called init_template.called_with('/mock_dir', template='app')
def test_init_dest_opt_conflict(): commands.init(None, '/mock/app', empty=True, template=True)
def test_init_dest_none(mock_doc, mock_cwd): commands.init(None)
def test_init_dest(init_basic, mock_join): ''' couchapp init /mock_dir ''' commands.init(None, '/mock_dir', empty=False, template='') init_basic.assert_called_once_with('/mock_dir')
def test_init_empty(mock_doc): ''' couchapp init -e ''' commands.init(None, '/tmp/mk', empty=True, template='') mock_doc.assert_called_once_with('/tmp/mk', create=True)
def test_init_dest_auto(mock_doc, mock_cwd): commands.init(None, None) mock_doc.assert_called_once_with('/mock_dir', create=True)
def test_init_dest(mock_doc): commands.init(None, None, '/tmp/mk') mock_doc.assert_called_once_with('/tmp/mk', create=True)