Created
December 2, 2013 17:25
-
-
Save kerin/7753074 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @fudge.patch('twanel.tasks.pgm') | |
| def test_task_retried_on_twitter_error(self, pgm): | |
| err = fudge.Fake('error').is_a_stub() | |
| err.fp.expects('read').returns('{}') | |
| err.code = 500 | |
| exc = TwitterHTTPError( | |
| err, | |
| 'friends/list', | |
| "", | |
| None | |
| ) | |
| (pgm | |
| .expects('get_all_panelists') | |
| .with_args(after_twitter_id=None) | |
| .raises(exc) | |
| ) | |
| with self.assertRaises(TwitterHTTPError): | |
| self.assertRaises(Retry, update_all_panelists_leaders) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment