示例#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')]))
示例#2
0
def test_create_ns_weird_no_open():
    # a namespace that closes but doesn't open
    assert ('/a/b/view++c' ==
            create_path([
                (DEFAULT, 'a'),
                (DEFAULT, 'b'),
                (DEFAULT, 'view++c')]))
示例#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}))
示例#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}))
示例#5
0
def test_create_ns():
    assert (u'/a/b/++view++c' ==
            create_path([
                (VIEW, u'c'),
                (DEFAULT, u'b'),
                (DEFAULT, u'a')]))
示例#6
0
def test_create():
    assert (u'/a/b/c' ==
            create_path([
                (DEFAULT, u'c'),
                (DEFAULT, u'b'),
                (DEFAULT, u'a')]))
示例#7
0
def test_create_ns_shortcut():
    assert ('/a/b/@@c' ==
            create_path([
                (DEFAULT, 'a'),
                (DEFAULT, 'b'),
                (VIEW, 'c')], shortcuts={'@@': VIEW}))
示例#8
0
def test_create():
    assert ('/a/b/c' == create_path([(DEFAULT, 'a'), (DEFAULT, 'b'),
                                     (DEFAULT, 'c')]))
示例#9
0
def test_create_ns():
    assert ('/a/b/++view++c' ==
            create_path([
                (DEFAULT, 'a'),
                (DEFAULT, 'b'),
                (VIEW, 'c')]))
示例#10
0
def test_create_ns_weird_no_open():
    # a namespace that closes but doesn't open
    assert ('/a/b/view++c' == create_path([(DEFAULT, 'a'), (DEFAULT, 'b'),
                                           (DEFAULT, 'view++c')]))
示例#11
0
def test_create_ns_weird_no_close():
    # a namespace that opens but doesn't close
    assert ('/a/b/++c' == create_path([(DEFAULT, 'a'), (DEFAULT, 'b'),
                                       (DEFAULT, '++c')]))
示例#12
0
def test_create_ns_shortcut_not_at_beginning():
    assert ('/a/b/a@@c' == create_path([(DEFAULT, 'a'), (DEFAULT, 'b'),
                                        (DEFAULT, 'a@@c')],
                                       shortcuts={'@@': VIEW}))
示例#13
0
def test_create_ns_shortcut():
    assert ('/a/b/@@c' == create_path([(DEFAULT, 'a'), (DEFAULT, 'b'),
                                       (VIEW, 'c')],
                                      shortcuts={'@@': VIEW}))
示例#14
0
def test_create_ns():
    assert ('/a/b/++view++c' == create_path([(DEFAULT, 'a'), (DEFAULT, 'b'),
                                             (VIEW, 'c')]))