コード例 #1
0
    def test_invisible_ILabelJarChild_without_parent_ILabelRoot(self, browser):
        folder = create(Builder('label display'))

        browser.login().visit(folder)
        self.assertFalse(
            jarportlet.portlet(), "The folder can't show the portlet because "
            "it has no parent label root folder")
コード例 #2
0
    def test_protlet_is_enabled_if_ILabelJarChild_and_parent_is_ILabelRoot(
            self, browser):
        folder = create(Builder('label root'))
        subfolder = create(Builder('label display').within(folder))

        browser.login().visit(subfolder)
        self.assertTrue(jarportlet.portlet())
コード例 #3
0
    def test_invisible_ILabelJarChild_without_parent_ILabelRoot(self, browser):
        folder = create(Builder('label display'))

        browser.login().visit(folder)
        self.assertFalse(
            jarportlet.portlet(),
            "The folder can't show the portlet because "
            "it has no parent label root folder")
コード例 #4
0
    def test_invisible_if_no_ILabelJarChild_but_parent_with_ILabelRoot(self, browser):
        folder = create(Builder('label root'))
        subfolder = create(Builder('folder').within(folder))

        browser.login().visit(subfolder)
        self.assertFalse(
            jarportlet.portlet(),
            "The folder shouldn't show the portlet because "
            "it has no ILabelJarChild marker interface")
コード例 #5
0
    def test_invisible_if_no_ILabelJarChild_but_parent_with_ILabelRoot(self, browser):
        folder = create(Builder('label root'))
        subfolder = create(Builder('folder').within(folder))

        browser.login().visit(subfolder)
        self.assertFalse(
            jarportlet.portlet(),
            "The folder shouldn't show the portlet because "
            "it has no ILabelJarChild marker interface")
コード例 #6
0
 def test_invisible_for_unprivileged_users_when_empty(self, browser):
     folder = create(Builder('label root'))
     browser.visit(folder)
     self.assertFalse(
         jarportlet.portlet(),
         'Anonymous users should not see labels portlet when it is empty.')
コード例 #7
0
    def test_protlet_is_enabled_if_ILabelJarChild_and_parent_is_ILabelRoot(self, browser):
        folder = create(Builder('label root'))
        subfolder = create(Builder('label display').within(folder))

        browser.login().visit(subfolder)
        self.assertTrue(jarportlet.portlet())
コード例 #8
0
 def test_protlet_is_enabled_if_ILabelRoot_is_provided(self, browser):
     folder = create(Builder('label root'))
     browser.login().visit(folder)
     self.assertTrue(jarportlet.portlet())
コード例 #9
0
 def test_portlet_is_disabled_per_default(self, browser):
     browser.visit()
     self.assertFalse(jarportlet.portlet())
コード例 #10
0
 def test_invisible_for_unprivileged_users_when_empty(self, browser):
     folder = create(Builder('label root'))
     browser.visit(folder)
     self.assertFalse(
         jarportlet.portlet(),
         'Anonymous users should not see labels portlet when it is empty.')
コード例 #11
0
 def test_protlet_is_enabled_if_ILabelRoot_is_provided(self, browser):
     folder = create(Builder('label root'))
     browser.login().visit(folder)
     self.assertTrue(jarportlet.portlet())
コード例 #12
0
 def test_portlet_is_disabled_per_default(self, browser):
     browser.visit()
     self.assertFalse(jarportlet.portlet())