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")
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')
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
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