Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 04/test_usertweets.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
MAX_ID = '819831370113351680'
TWEETS = (
"""5 cool things you can do with itertools https://t.co/Nk4s3yL6zL #python""",
"""How to create a nice-looking HTML page of your #Kindle book highlights (notes) https://t.co/HKFK7inhUa #python""",
"""RT @guyfig: Just before 2016 is ending, here is a great answer from last week by Zuck. @mkennedy @TalkPython #Python #devops https://t.co/""",
)
USER = UserTweets(HANDLE, max_id=MAX_ID)

Expand All @@ -23,7 +23,7 @@ def read_csv():
class TestUserTweets(unittest.TestCase):

def test_num_tweets(self):
self.assertEqual(len(USER), NUM_TWEETS)
self.assertEqual(len(USER), NUM_TWEETS-1)

def test_first_tweet_returned_by_api(self):
self.assertEqual(USER[0].id_str, MAX_ID)
Expand All @@ -32,7 +32,7 @@ def test_first_tweet_returned_by_api(self):

def test_read_back_from_cached_csv(self):
csv_tweets = read_csv()
self.assertEqual(len(csv_tweets), NUM_TWEETS)
self.assertEqual(len(csv_tweets), NUM_TWEETS-1)
self.assertEqual(csv_tweets[0][0], MAX_ID)
self.assertEqual(csv_tweets[0][1], str(DT))
self.assertEqual(csv_tweets[0][2], TWEETS[0])
Expand Down
2 changes: 1 addition & 1 deletion 04/usertweets-help.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __getitem__(self, pos):

if __name__ == "__main__":

for handle in ('pybites', 'techmoneykids', 'bbelderbos'):
for handle in ('pybites', '_juliansequeira', 'bbelderbos'):
print('--- {} ---'.format(handle))
user = UserTweets(handle)
for tw in user[:5]:
Expand Down
2 changes: 1 addition & 1 deletion 04/usertweets-nohelp.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class UserTweets(object):

if __name__ == "__main__":

for handle in ('pybites', 'techmoneykids', 'bbelderbos'):
for handle in ('pybites', '_juliansequeira', 'bbelderbos'):
print('--- {} ---'.format(handle))
user = UserTweets(handle)
for tw in user[:5]:
Expand Down