'Return a test method that will check what session type will
be used if the OpenID 1 response to an associate call sets the
\'session_type\' field to `session_type_value`'

def mkTest(expected_session_type, session_type_value):

    def test(self):
        self._doTest(expected_session_type, session_type_value)
        self.failUnlessEqual(0, len(self.messages))
    return test
