python-requests implemented
This commit is contained in:
parent
7334556248
commit
6325b16265
5 changed files with 54 additions and 15 deletions
|
|
@ -5,13 +5,20 @@ import json
|
|||
import requests
|
||||
|
||||
import twythonrequests
|
||||
twitter = twythonrequests.Twython()
|
||||
|
||||
class TestTwythonRequests(unittest.TestCase):
|
||||
def test_search(self):
|
||||
twitter = twythonrequests.Twython()
|
||||
result = twitter.search(q='python')
|
||||
self.assertTrue(result['results'])
|
||||
|
||||
def test_searchTwitter(self):
|
||||
result = twitter.searchTwitter(q='python')
|
||||
self.assertTrue(result['results'])
|
||||
|
||||
def test_getProfileImageUrl(self):
|
||||
result = twitter.getProfileImageUrl(username='kracetheking')
|
||||
self.assertTrue(result)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue