コード例 #1
0
ファイル: test_pathstack.py プロジェクト: kingel/morepath
def test_parse_ns_weird_no_close():
    # a namespace that opens but doesn't close
    assert (u'/a/b/++c' ==
            create_path([
                (DEFAULT, u'++c'),
                (DEFAULT, u'b'),
                (DEFAULT, u'a')]))
コード例 #2
0
ファイル: test_pathstack.py プロジェクト: oohlaf/morepath
def test_parse_ns_weird_no_close():
    # a namespace that opens but doesn't close
    assert (u'/a/b/++c' == create_path([(DEFAULT, u'++c'), (DEFAULT, u'b'),
                                        (DEFAULT, u'a')]))
コード例 #3
0
ファイル: test_pathstack.py プロジェクト: oohlaf/morepath
def test_create_ns_shortcut_not_at_beginning():
    assert (u'/a/b/a@@c' == create_path([(DEFAULT, u'a@@c'), (DEFAULT, u'b'),
                                         (DEFAULT, u'a')],
                                        shortcuts={u'@@': VIEW}))
コード例 #4
0
ファイル: test_pathstack.py プロジェクト: oohlaf/morepath
def test_create_ns_shortcut():
    assert (u'/a/b/@@c' == create_path([(VIEW, u'c'), (DEFAULT, u'b'),
                                        (DEFAULT, u'a')],
                                       shortcuts={u'@@': VIEW}))
コード例 #5
0
ファイル: test_pathstack.py プロジェクト: oohlaf/morepath
def test_create_ns():
    assert (u'/a/b/++view++c' == create_path([(VIEW, u'c'), (DEFAULT, u'b'),
                                              (DEFAULT, u'a')]))
コード例 #6
0
ファイル: test_pathstack.py プロジェクト: oohlaf/morepath
def test_create():
    assert (u'/a/b/c' == create_path([(DEFAULT, u'c'), (DEFAULT, u'b'),
                                      (DEFAULT, u'a')]))
コード例 #7
0
ファイル: test_pathstack.py プロジェクト: kingel/morepath
def test_create_ns_shortcut_not_at_beginning():
    assert (u'/a/b/a@@c' ==
            create_path([
                (DEFAULT, u'a@@c'),
                (DEFAULT, u'b'),
                (DEFAULT, u'a')], shortcuts={u'@@': VIEW}))
コード例 #8
0
ファイル: test_pathstack.py プロジェクト: kingel/morepath
def test_create_ns_shortcut():
    assert (u'/a/b/@@c' ==
            create_path([
                (VIEW, u'c'),
                (DEFAULT, u'b'),
                (DEFAULT, u'a')], shortcuts={u'@@': VIEW}))
コード例 #9
0
ファイル: test_pathstack.py プロジェクト: kingel/morepath
def test_create_ns():
    assert (u'/a/b/++view++c' ==
            create_path([
                (VIEW, u'c'),
                (DEFAULT, u'b'),
                (DEFAULT, u'a')]))
コード例 #10
0
ファイル: test_pathstack.py プロジェクト: kingel/morepath
def test_create():
    assert (u'/a/b/c' ==
            create_path([
                (DEFAULT, u'c'),
                (DEFAULT, u'b'),
                (DEFAULT, u'a')]))