示例#1
0
文件: tests.py 项目: mccutchen/chirp
 def test_build_get_url_with_params(self):
     new_api = self.api.statuses.public_timeline
     url, body = chirp.build_url('get', new_api.paths, trim_user=True)
     self.assertEqual(url, '/1/statuses/public_timeline.json?trim_user=1')
     self.assertEqual(body, None)
示例#2
0
文件: tests.py 项目: mccutchen/chirp
 def test_build_post_url(self):
     new_api = self.api.statuses.update
     url, body = chirp.build_url('post', new_api.paths, status='Hello!')
     self.assertEqual(url, '/1/statuses/update.json')
     self.assertEqual(body, 'status=Hello%21')
示例#3
0
文件: tests.py 项目: mccutchen/chirp
 def test_build_get_url(self):
     new_api = self.api.statuses.public_timeline
     url, body = chirp.build_url('get', new_api.paths)
     self.assertEqual(url, '/1/statuses/public_timeline.json')
     self.assertEqual(body, None)