test_oauth.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:Fetch 作者: bourdakos1 项目源码 文件源码
def test_get_normalized_string_escapes_spaces_properly(self):
        url = "http://sp.example.com/"
        params = {
            "some_random_data": random.randint(100, 1000),
            "data": "This data with a random number (%d) has spaces!"
                                    % random.randint(1000, 2000),
        }

        req = oauth.Request("GET", url, params)
        res = req.get_normalized_parameters()
        expected = urlencode(sorted(params.items())).replace('+', '%20')
        self.assertEqual(expected, res)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号