Example #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
Example #2
0
 def f():
     find_template_dir(tmpl_type='mock_type')
Example #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
Example #4
0
def test_find_template_dir_not_found(isdir):
    assert find_template_dir() is None
    assert isdir.called
Example #5
0
 def f():
     find_template_dir(raise_error=True)
Example #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
Example #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
Example #8
0
 def f():
     find_template_dir(tmpl_type='mock_type')
Example #9
0
 def f():
     find_template_dir(raise_error=True)
Example #10
0
def test_find_template_dir_not_found(isdir):
    assert find_template_dir() is None
    assert isdir.called