-
Notifications
You must be signed in to change notification settings - Fork 2
/
tests.py
18 lines (13 loc) · 5.03 KB
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import unittest
from angellist import AngelList
class MyTest(unittest.TestCase):
def setUp(self):
self.a = AngelList('GIVE YOUR ACCESS_TOKEN HERE')
def test_search(self):
self.assertEqual(self.a.search({'method':'GET', 'query':'Kingsley'}) , [{u'url': u'https://angel.co/kingsley-jegan-joseph', u'pic': u'https://s3.amazonaws.com/photos.angel.co/users/53090-medium_jpg?1322544959', u'type': u'User', u'id': 53090, u'name': u'Kingsley Jegan Joseph'}, {u'url': u'https://angel.co/ashleykingsley', u'pic': u'https://s3.amazonaws.com/photos.angel.co/users/60641-medium_jpg?1317064450', u'type': u'User', u'id': 60641, u'name': u'Ashley E. Kingsley'}, {u'url': u'https://angel.co/kingsleyharris', u'pic': u'https://s3.amazonaws.com/photos.angel.co/users/42652-medium_jpg?1342996719', u'type': u'User', u'id': 42652, u'name': u'Kingsley Harris'}, {u'url': u'https://angel.co/tom-kingsley', u'pic': None, u'type': u'User', u'id': 33985, u'name': u'Tom Kingsley'}, {u'url': u'https://angel.co/christopher-kingsley', u'pic': u'https://s3.amazonaws.com/photos.angel.co/users/170398-medium_jpg?1346900175', u'type': u'User', u'id': 170398, u'name': u'Christopher Kingsley'}, {u'url': u'https://angel.co/kidehen', u'pic': u'https://s3.amazonaws.com/photos.angel.co/users/83438-medium_jpg?1325279789', u'type': u'User', u'id': 83438, u'name': u'Kingsley Uyi Idehen'}, {u'url': u'https://angel.co/kingsleyirons', u'pic': u'https://s3.amazonaws.com/photos.angel.co/users/209027-medium_jpg?1355180913', u'type': u'User', u'id': 209027, u'name': u'Kingsley Irons'}, {u'url': u'https://angel.co/kingsley2', u'pic': u'https://s3.amazonaws.com/photos.angel.co/users/11977-medium_jpg?1299003437', u'type': u'User', u'id': 11977, u'name': u'Kingsley Joseph'}, {u'url': u'https://angel.co/wood2energy', u'pic': None, u'type': u'User', u'id': 187785, u'name': u'Eric Kingsley'}, {u'url': u'https://angel.co/baretalk', u'pic': None, u'type': u'User', u'id': 231453, u'name': u'paul kingsley'}])
def test_startup(self):
self.assertEqual(self.a.startups({'method':'GET', 'id':'29853'}), {u'status': None, u'crunchbase_url': None, u'video_url': None, u'company_url': u'http://www.ideophone.in', u'company_type': [], u'updated_at': u'2011-12-26T18:36:03Z', u'quality': 4, u'id': 29853, u'angellist_url': u'https://angel.co/ideophone', u'screenshots': [], u'follower_count': 32, u'hidden': False, u'logo_url': u'https://s3.amazonaws.com/photos.angel.co/startups/i/29853-a9560f987b1aa051edb2b3b6673d3acb-medium_jpg.jpg?buster=1323194019', u'markets': [{u'angellist_url': u'https://angel.co/mobile-2', u'display_name': u'Mobile', u'id': 3, u'name': u'mobile', u'tag_type': u'MarketTag'}, {u'angellist_url': u'https://angel.co/transportation', u'display_name': u'Transportation', u'id': 631, u'name': u'transportation', u'tag_type': u'MarketTag'}], u'community_profile': False, u'product_desc': u'Ideophone builds apps for commuters. Helps users travel cheaper, safer, together, and better informed. Used by 35,000 people from 145 countries.', u'twitter_url': u'http://twitter.com/ideophonelabs', u'high_concept': u'Apps for commuters', u'locations': [{u'angellist_url': u'https://angel.co/bangalore', u'display_name': u'Bangalore', u'id': 1904, u'name': u'bangalore', u'tag_type': u'LocationTag'}], u'thumb_url': u'https://s3.amazonaws.com/photos.angel.co/startups/i/29853-a9560f987b1aa051edb2b3b6673d3acb-thumb_jpg.jpg?buster=1323194019', u'name': u'Ideophone', u'created_at': u'2011-12-06T17:53:40Z', u'blog_url': u'http://www.ideophone.in/blog/'})
def test_startup_search(self):
self.assertEqual(self.a.startups__search({'method':'GET', 'slug':'ideophone'}), {u'status': None, u'crunchbase_url': None, u'video_url': None, u'company_url': u'http://www.ideophone.in', u'company_type': [], u'updated_at': u'2011-12-26T18:36:03Z', u'quality': 4, u'id': 29853, u'angellist_url': u'https://angel.co/ideophone', u'screenshots': [], u'follower_count': 32, u'hidden': False, u'logo_url': u'https://s3.amazonaws.com/photos.angel.co/startups/i/29853-a9560f987b1aa051edb2b3b6673d3acb-medium_jpg.jpg?buster=1323194019', u'markets': [{u'angellist_url': u'https://angel.co/mobile-2', u'display_name': u'Mobile', u'id': 3, u'name': u'mobile', u'tag_type': u'MarketTag'}, {u'angellist_url': u'https://angel.co/transportation', u'display_name': u'Transportation', u'id': 631, u'name': u'transportation', u'tag_type': u'MarketTag'}], u'community_profile': False, u'product_desc': u'Ideophone builds apps for commuters. Helps users travel cheaper, safer, together, and better informed. Used by 35,000 people from 145 countries.', u'twitter_url': u'http://twitter.com/ideophonelabs', u'high_concept': u'Apps for commuters', u'locations': [{u'angellist_url': u'https://angel.co/bangalore', u'display_name': u'Bangalore', u'id': 1904, u'name': u'bangalore', u'tag_type': u'LocationTag'}], u'thumb_url': u'https://s3.amazonaws.com/photos.angel.co/startups/i/29853-a9560f987b1aa051edb2b3b6673d3acb-thumb_jpg.jpg?buster=1323194019', u'name': u'Ideophone', u'created_at': u'2011-12-06T17:53:40Z', u'blog_url': u'http://www.ideophone.in/blog/'})
if __name__ == '__main__':
unittest.main()