Skip to content

Conversation

@FabioRosado
Copy link

Hello,

I've been trying for a while to figure out why we get 99 tweets when NUM_TWEETS is set to 100 or 100 when set to 101. I believe this might be an issue with tweepy, when we specify the count parameter to the user_timeline() it will stop one short (like when we use the range() function).

To counter that I've changed the tests to take NUM_TWEETS and reduce 1. Another way to do this would be update the solution version and add +1 to the count parameter, let me know if you'd rather have the solutions modified.

The code also fails when trying to get data from the handle techmoneykids, I made a guess and figured out that this was probably Julian's old handle so I replaced it with the right one.

Please let me know what you think of this and if you need me to change something 👍

@bbelderbos
Copy link
Collaborator

Thanks Fábio, this must have been old work cause the tests call the API, my bad. This is a part you really would want to mock, see an example here: https://github.com/pybites/100DaysOfCode/blob/master/081/test_whotweeted.py - if you want to give it a try, otherwise I will do it at a later time.

Cheers
Bob

@ghost
Copy link

ghost commented Mar 3, 2018

Hi Bob,
for what I see, the update has not been merge yet, so I have the same error as Fabio.
Have you planned to do this ? Do you need help ? Maybe you don't have time and i am gladly offer my help if you want :)

@bbelderbos
Copy link
Collaborator

Hey @FabioRosado @Germione was gonna code this up but look at this nice PR: #221 - will verify and merge it now. Thanks for reminding me, these are busy months here.

@pybites
Copy link
Owner

pybites commented Mar 3, 2018

@Germione all good now, pull the community branch: your code passes with the new tests in place, nice.

@FabioRosado your code is not yet on the community branch, please PR the script (not the tests) and I will run the tests and merge it.

@pybites pybites closed this Mar 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants