Exemple #1
0
    def test_createUser(self):
        """
        Test that L{webadmin.UserInteractionFragment.createUser} method
        actually creates a user.
        """
        userInteractionFragment = UserInteractionFragment(self.browser)
        userInteractionFragment.createUser(u"testuser", u"localhost", u"password")

        account = self.loginSystem.accountByAddress(u"testuser", u"localhost")
        self.assertEquals(account.password, u"password")
Exemple #2
0
    def test_createUser(self):
        """
        Test that L{webadmin.UserInteractionFragment.createUser} method
        actually creates a user.
        """
        userInteractionFragment = UserInteractionFragment(self.browser)
        userInteractionFragment.createUser(
            u'testuser', u'localhost', u'password')

        account = self.loginSystem.accountByAddress(u'testuser', u'localhost')
        self.assertEquals(account.password, u'password')
Exemple #3
0
    def test_rendering(self):
        """
        Test that L{webadmin.UserInteractionFragment} renders without raising
        any exceptions.
        """
        f = UserInteractionFragment(self.browser)

        p = LivePage(docFactory=stan(html[head(render=directive("liveglue")), body(render=lambda ctx, data: f)]))
        f.setFragmentParent(p)

        ctx = WovenContext()
        req = FakeRequest()
        ctx.remember(req, IRequest)

        d = p.renderHTTP(ctx)

        def rendered(ign):
            p.action_close(None)

        d.addCallback(rendered)
        return d
Exemple #4
0
    def test_rendering(self):
        """
        Test that L{webadmin.UserInteractionFragment} renders without raising
        any exceptions.
        """
        f = UserInteractionFragment(self.browser)

        p = LivePage(
            docFactory=stan(
                html[
                    head(render=directive('liveglue')),
                    body(render=lambda ctx, data: f)]))
        f.setFragmentParent(p)

        ctx = WovenContext()
        req = FakeRequest()
        ctx.remember(req, IRequest)

        d = p.renderHTTP(ctx)
        def rendered(ign):
            p.action_close(None)
        d.addCallback(rendered)
        return d