Ejemplo n.º 1
0
    def testNavigationOrderPopulate(self):
        Content(route='athing', show_in_navigation=True).save()
        Content(route='bthing', show_in_navigation=True).save()
        Content(route='notathing').save()
        ContentNavigationOrder.populate_from_content()

        eq_(NavigationOrder.objects(order=0).first().route, 'athing')
        eq_(NavigationOrder.objects(order=1).first().route, 'bthing')
        eq_(NavigationOrder.objects(order=2).first(), None)