def test_upgrade(self): absolute = metadata_parser.url_to_absolute_url( 'a.html', url_fallback='http://example.com') self.assertEqual(absolute, 'http://example.com/a.html')
def test_fallback(self): absolute = metadata_parser.url_to_absolute_url( None, url_fallback='http://example.com') self.assertEqual(absolute, 'http://example.com')
def test_upgrade(self): absolute = metadata_parser.url_to_absolute_url( "a.html", url_fallback="http://example.com") self.assertEqual(absolute, "http://example.com/a.html")
def test_none_returns_none(self): absolute = metadata_parser.url_to_absolute_url(None, url_fallback=None) self.assertEqual(absolute, None)
def test_nothing(self): absolute = metadata_parser.url_to_absolute_url( "http://example.com", url_fallback="http://example.com") self.assertEqual(absolute, "http://example.com")
def test_nothing(self): absolute = metadata_parser.url_to_absolute_url( 'http://example.com', url_fallback='http://example.com') self.assertEquals(absolute, 'http://example.com')
def test_fallback(self): absolute = metadata_parser.url_to_absolute_url(None, url_fallback='http://example.com') self.assertEqual(absolute, 'http://example.com')
def test_upgrade(self): absolute = metadata_parser.url_to_absolute_url('a.html', url_fallback='http://example.com') self.assertEqual(absolute, 'http://example.com/a.html')
def test_none_returns_none(self): absolute = metadata_parser.url_to_absolute_url(None, url_fallback=None) self.assertEqual(absolute, None)