Beispiel #1
0
    def testNormalizeTraditionalFormWithStructuredResource(self):
        parsed = ElogProcessor.parse_uri('[email protected]/resource/subresource:****')

        self.assertEqual({
            'node': 'node',
            'host': 'host.com',
            'resource': 'resource/subresource',
            'password': '******',
        }, parsed)
Beispiel #2
0
    def testNormalizeModernForm(self):
        parsed = ElogProcessor.parse_uri('node:****@host.com')

        self.assertEqual({
            'node': 'node',
            'host': 'host.com',
            'resource': None,
            'password': '******',
        }, parsed)
Beispiel #3
0
 def test_hostname_resource(self):
     jid = ElogProcessor.make_jid(ElogProcessor.parse_uri('node:****@host.com/foo/%hostname%'))
     self.assertEqual('node', jid.local)
     self.assertEqual('host.com', jid.domain)
     self.assertEqual('foo/%s' % self.host, jid.resource)
Beispiel #4
0
 def test_simple_resource(self):
     jid = ElogProcessor.make_jid(ElogProcessor.parse_uri('node:****@host.com/foo'))
     self.assertEqual('node', jid.local)
     self.assertEqual('host.com', jid.domain)
     self.assertEqual('foo', jid.resource)