'A failing test for bug #112'

def test_mysterious_missing_namespace_bug(self):

    openid_args = {'assoc_handle': '{{HMAC-SHA256}{1211477242.29743}{v5cadg==}', 'claimed_id': 'http://nerdbank.org/OPAffirmative/AffirmativeIdentityWithSregNoAssoc.aspx', 'ns.sreg': 'http://openid.net/extensions/sreg/1.1', 'response_nonce': '2008-05-22T17:27:22ZUoW5.\\NV', 'signed': 'return_to,identity,claimed_id,op_endpoint,response_nonce,ns.sreg,sreg.email,sreg.nickname,assoc_handle', 'sig': 'e3eGZ10+TNRZitgq5kQlk5KmTKzFaCRI8OrRoXyoFa4=', 'mode': 'check_authentication', 'op_endpoint': 'http://nerdbank.org/OPAffirmative/ProviderNoAssoc.aspx', 'sreg.nickname': 'Andy', 'return_to': 'http://localhost.localdomain:8001/process?janrain_nonce=2008-05-22T17%3A27%3A21ZnxHULd', 'invalidate_handle': '{{HMAC-SHA1}{1211477241.92242}{H0akXw==}', 'identity': 'http://nerdbank.org/OPAffirmative/AffirmativeIdentityWithSregNoAssoc.aspx', 'sreg.email': 'a@b.com'}
    m = message.Message.fromOpenIDArgs(openid_args)
    self.failUnless((('http://openid.net/extensions/sreg/1.1', 'sreg') in list(m.namespaces.iteritems())))
    missing = []
    for k in openid_args['signed'].split(','):
        if (not (('openid.' + k) in m.toPostArgs().keys())):
            missing.append(k)
    self.assertEqual([], missing, missing)
    self.assertEqual(openid_args, m.toArgs())
    self.failUnless(m.isOpenID1())
