'Test different forms of JIDs.'

def test_parse(self):

    self.assertEqual(jid.parse('user@host/resource'), ('user', 'host', 'resource'))
    self.assertEqual(jid.parse('user@host'), ('user', 'host', None))
    self.assertEqual(jid.parse('host'), (None, 'host', None))
    self.assertEqual(jid.parse('host/resource'), (None, 'host', 'resource'))
    self.assertEqual(jid.parse('foo/bar@baz'), (None, 'foo', 'bar@baz'))
    self.assertEqual(jid.parse('boo@foo/bar@baz'), ('boo', 'foo', 'bar@baz'))
    self.assertEqual(jid.parse('boo@foo/bar/baz'), ('boo', 'foo', 'bar/baz'))
    self.assertEqual(jid.parse('boo/foo@bar@baz'), (None, 'boo', 'foo@bar@baz'))
    self.assertEqual(jid.parse('boo/foo/bar'), (None, 'boo', 'foo/bar'))
    self.assertEqual(jid.parse('boo//foo'), (None, 'boo', '/foo'))
