示例#1
0
 def test_wrong_authentication_page_contains_url(self):
     """ Resulting page should contain the specified URLs """
     want_username = "******"
     want_id = "http://foo.example.org/id/bill"
     page = pagetemplate.wrong_authentication_page(
         want_username=want_username,
         want_id_url=want_id,
     )
     page_data = page.serialise()
     self.failUnlessOutputCheckerMatch("...%(want_id)s..." % vars(),
                                       page_data)
示例#2
0
    def _make_wrong_authentication_response(self, want_id):
        """ Make a response for action with wrong session auth """
        want_username = self._get_username_from_identity(want_id)
        header = ResponseHeader(http_codes["OK"])
        page = pagetemplate.wrong_authentication_page(
            want_username = want_username,
            want_id_url = want_id
            )
        data = self._get_page_data(page)
        response = Response(header, data)

        return response
示例#3
0
 def test_wrong_authentication_page_contains_url(self):
     """ Resulting page should contain the specified URLs """
     want_username = "******"
     want_id = "http://foo.example.org/id/bill"
     page = pagetemplate.wrong_authentication_page(
         want_username = want_username,
         want_id_url = want_id,
         )
     page_data = page.serialise()
     self.failUnlessOutputCheckerMatch(
         "...%(want_id)s..." % vars(), page_data
         )