'Test if hosts and ports are properly extracted from URIs.
This should be done according to the MAC Authentication spec.
Defaults ports should be provided when none is present in the URI.'

def test_host_from_uri(self):

    self.assertEqual(host_from_uri(u'http://a.b-c.com:8080'), (u'a.b-c.com', u'8080'))
    self.assertEqual(host_from_uri(u'https://a.b.com:8080'), (u'a.b.com', u'8080'))
    self.assertEqual(host_from_uri(u'http://www.example.com'), (u'www.example.com', u'80'))
    self.assertEqual(host_from_uri(u'https://www.example.com'), (u'www.example.com', u'443'))
