def test_parsed_query(self): uri_string = "http://foo:80/?foo=bar" uri = RedirectURI(uri_string, self.oauth_settings) self.assertEqual( uri.parsed_query()["foo"], "bar", "check that the value is not a list since parseqs seems hellbent on making it one", )
def test_is_absolute(self): uri = RedirectURI("http://foo/bar", self.oauth_settings) self.assertTrue(uri.is_absolute()) uri = RedirectURI("http://", self.oauth_settings) self.assertFalse(uri.is_absolute()) uri = RedirectURI("//foo", self.oauth_settings) self.assertFalse(uri.is_absolute())
def test_get_url(self): uri_string = "http://foo:80/" uri = RedirectURI(uri_string, self.oauth_settings) self.assertEqual(uri.get_url(), uri_string)