Exemple #1
0
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')]))
Exemple #2
0
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')]))
Exemple #3
0
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}))
Exemple #4
0
def test_create_ns_shortcut():
    assert (u'/a/b/@@c' == create_path([(VIEW, u'c'), (DEFAULT, u'b'),
                                        (DEFAULT, u'a')],
                                       shortcuts={u'@@': VIEW}))
Exemple #5
0
def test_create_ns():
    assert (u'/a/b/++view++c' == create_path([(VIEW, u'c'), (DEFAULT, u'b'),
                                              (DEFAULT, u'a')]))
Exemple #6
0
def test_create():
    assert (u'/a/b/c' == create_path([(DEFAULT, u'c'), (DEFAULT, u'b'),
                                      (DEFAULT, u'a')]))
Exemple #7
0
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}))
Exemple #8
0
def test_create_ns_shortcut():
    assert (u'/a/b/@@c' ==
            create_path([
                (VIEW, u'c'),
                (DEFAULT, u'b'),
                (DEFAULT, u'a')], shortcuts={u'@@': VIEW}))
Exemple #9
0
def test_create_ns():
    assert (u'/a/b/++view++c' ==
            create_path([
                (VIEW, u'c'),
                (DEFAULT, u'b'),
                (DEFAULT, u'a')]))
Exemple #10
0
def test_create():
    assert (u'/a/b/c' ==
            create_path([
                (DEFAULT, u'c'),
                (DEFAULT, u'b'),
                (DEFAULT, u'a')]))