def test_show_translate(self, client): root = Node.root() n = root.add(langslugs=dict(en="en", nl="nl", fr="fr")) t_nl = Type1(node=n, language="nl", title="NL").save() translation.activate("en") request = create_request("GET", "/") toolbar = Toolbar(n, request, "view") assert toolbar.show_translate() assert not toolbar.show_update() translation.activate("nl") assert not toolbar.show_translate() assert toolbar.show_update()
def test_update_mode_buttons(self, client): """ verify that certain buttons are not shown in update mode """ node = Node.root() content = Type1(node=node) content.save() toolbar = Toolbar(node, superuser_request("/"), "update") assert not toolbar.show_create() assert not toolbar.show_update()