Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (30 sloc) 1.36 KB
from tweetpie.core import Twitter, TwitterError, Error, ENDPOINTS, AuthError,\
import nose
t = Twitter()
def test_call_geo_search_ip():
""" Test for params ip in geo_search. This ip address belongs to tumblr"""
r ='geo_search', params={'ip': ''})
assert r['result']['places'][1]['name'] == u'Manhattan'
def test_call_geo_search_query_toronto():
""" Test for params query in geo_search. query = Toronto """
r ='geo_search', params={'query': 'Toronto'})
assert r['result']['places'][1]['name'] == u'Toronto'
def test_call_geo_search_query_bangalore():
""" Test for params query in geo_search. query = Bangalore
Shame on twitter don't Bangalore ?
r ='geo_search', params={'query': 'Bangalore'})
assert r['result']['places'] == []
def test_get_func_names():
r = t.get_func_names()
assert len(r) >= 1
def test_get_func_details():
r = t.get_func_details('geo_search'), str)
def test_call_geo_reverse_geocode():
""" test for geo_reverse_geocode"""
r ="geo_reverse_geocode", params={'lat': 37.76893497, \
'long': -122.42284884})
assert r['result']['places'][1]['name'] == u'San Francisco'