Beispiel #1
0
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')
Beispiel #2
0
def test_init_dest_opt_conflict():
    commands.init(None, '/mock/app', empty=True, template=True)
Beispiel #3
0
def test_init_dest_none(mock_doc, mock_cwd):
    commands.init(None)
Beispiel #4
0
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')
Beispiel #5
0
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)
Beispiel #6
0
def test_init_dest_auto(mock_doc, mock_cwd):
    commands.init(None, None)
    mock_doc.assert_called_once_with('/mock_dir', create=True)
Beispiel #7
0
def test_init_dest(mock_doc):
    commands.init(None, None, '/tmp/mk')
    mock_doc.assert_called_once_with('/tmp/mk', create=True)