def test_quoting_of_local_urls(self): rv = urls.iri_to_uri(u'/foo\x8f') self.assert_strict_equal(rv, '/foo%C2%8F') self.assert_is(type(rv), str)