Exemplo n.º 1
0
def test_find_template_dir_user_dir_first_with_type(isdir, user_path):
    ret = find_template_dir(tmpl_type='app')

    assert ret == '/mock/.couchapp/templates/app', ret
    assert user_path.called
    assert isdir.called
Exemplo n.º 2
0
 def f():
     find_template_dir(tmpl_type='mock_type')
Exemplo n.º 3
0
def test_find_template_dir_user_dir_first(isdir, user_path):
    ret = find_template_dir()

    assert ret == '/mock/.couchapp/templates/', ret
    assert user_path.called
    assert isdir.called
Exemplo n.º 4
0
def test_find_template_dir_not_found(isdir):
    assert find_template_dir() is None
    assert isdir.called
Exemplo n.º 5
0
 def f():
     find_template_dir(raise_error=True)
Exemplo n.º 6
0
def test_find_template_dir_user_dir_first_with_type(isdir, user_path):
    ret = find_template_dir(tmpl_type='app')

    assert ret == '/mock/.couchapp/templates/app', ret
    assert user_path.called
    assert isdir.called
Exemplo n.º 7
0
def test_find_template_dir_user_dir_first(isdir, user_path):
    ret = find_template_dir()

    assert ret == '/mock/.couchapp/templates/', ret
    assert user_path.called
    assert isdir.called
Exemplo n.º 8
0
 def f():
     find_template_dir(tmpl_type='mock_type')
Exemplo n.º 9
0
 def f():
     find_template_dir(raise_error=True)
Exemplo n.º 10
0
def test_find_template_dir_not_found(isdir):
    assert find_template_dir() is None
    assert isdir.called