@@ -0,0 +1,1026 @@
+from pytest import fixture, raises%0A%0Afrom flask.ext.navigation.navbar import NavigationBar%0Afrom flask.ext.navigation.item import Item%0A%0A%0A@fixture%0Adef navbar():%0A    navbar = NavigationBar('mybar', %5B%0A        Item(u'Home', 'home'),%0A        Item(u'News', 'news'),%0A    %5D)%0A    return navbar%0A%0A%0Adef test_attrs(navbar):%0A    assert navbar.name == 'mybar'%0A    assert len(navbar.items) == 2%0A%0A%0Adef test_iterable(navbar):%0A    iterable = iter(navbar)%0A%0A    item_1st = next(iterable)%0A    assert item_1st.label == u'Home'%0A    assert item_1st.endpoint == 'home'%0A%0A    item_2nd = next(iterable)%0A    assert item_2nd.label == u'News'%0A    assert item_2nd.endpoint == 'news'%0A%0A    with raises(StopIteration):%0A        next(iterable)%0A%0A    item_reentry = next(iter(navbar))  # test for reentry iterable%0A    assert item_reentry.label == u'Home'%0A    assert item_reentry.endpoint == 'home'%0A%0A%0Adef test_initializer(navbar):%0A    @navbar.initializer%0A    def initialize_more_items(nav):%0A        return nav%0A    assert navbar.initializers%5B0%5D is initialize_more_items%0A

test the navbar.