Commit Graph
119 Commits
Author SHA1 Message Date
Vincent Jacques 6a92d3ed63 Make PaginatedList.reversed return a new list (follow-up #184)
This will avoid surprises if both the list and its reversed version
are iterated.
2013-08-21 13:02:21 +02:00
Vincent Jacques 6dd8651faf Merge branch 'topic/ReversePagination' into develop 2013-08-21 12:29:20 +02:00
Vincent Jacques ae3455c8d7 Add test coverage for #182 2013-08-20 23:17:19 +02:00
Vincent Jacques 67a7daa22b Improve coverage for #187 2013-08-19 23:35:02 +02:00
Vincent Jacques 629d012d8e Improve coverage 2013-08-19 14:26:39 +02:00
Vincent Jacques 4b70da0789 Merge branch 'topic/ImproveRateLimiting' into develop 2013-08-19 14:13:12 +02:00
Vincent Jacques df8df543c3 Merge branch 'develop' into topic/KnowYourParent 2013-08-15 08:20:01 +02:00
Ed Jackson 211e4633ee Minor enhancements to rate limiting information
If rate limiting information hasn't been retrieved already, it will be checked
rather than just assuming 5000 requests remaining of 5000.

Add an additional attribute `rate_limiting_resettime` to reflect github's new
X-RateLimit-Reset header. This integer value is a unix timestamp.

RateLimiting unit test updated accordingly.
2013-08-06 10:42:57 -05:00
davidbrai cb03b9e7d1 bugfix: returning real list instead of generator
Changed reversed(content) to content[::-1] in order to return
a real list and not a generator.
The code in PaginatedListBase.__grow does an iteration over
newElements when using `+=` and then returns them.
When using a generator, newElements would be empty when they are returned.
2013-08-03 16:49:10 +03:00
davidbrai 271f3f301e bug fix: empty nextUrl if no next/prev
Fixes a bug introduced in the previous commits.
Now testing a case where no lastUrl is returned.
Also fixing a regression where nextUrl wasn't erased properly.
2013-08-02 18:59:11 +03:00
davidbrai ef4cf44ebd support reverse iteration in PaginatedList
This uses the 'last' and 'prev' links in the HTTP headers.
The usage is repo.get_issues().reversed
2013-08-02 18:20:39 +03:00
Vincent Jacques 06a3d87098 Change source file header format 2013-07-13 19:03:53 +02:00
Vincent Jacques 56309b90f2 Run the script added in previous commit 2013-07-13 11:10:00 +02:00
Vincent Jacques 837dff5677 Restore coverage 2013-07-07 17:44:47 +02:00
Vincent Jacques 792970e524 pep8 2013-07-07 17:30:24 +02:00
Stuart Glaser 5b2954e471 Populates Issue's repository from URL when not in response. 2013-06-29 03:43:12 -07:00
Vincent Jacques 88db904484 Add a (redoundant) test for pull #176 2013-06-19 12:35:25 +02:00
davidbrai 8d22935180 bugfix: using custom per_page in repo.get_comments 2013-06-19 00:36:03 +03:00
Vincent Jacques d0002b7a3c Fix pep8 and copyrights 2013-06-18 22:35:46 +02:00
Vincent Jacques 6306f798fd Add test for pull request #174 2013-06-18 22:12:15 +02:00
Vincent Jacques f62f384bc6 Implement GET /users (issue #173) 2013-06-18 17:58:29 +02:00
Vincent Jacques c93e4b8ff4 Add tests for html_url for Issue and PullComment (#170)
I just modified the ReplayData manually and added a "get" in the tests.
2013-05-31 13:48:02 +02:00
Vincent Jacques db2a9db721 Add two new types of exceptions (issue #152) 2013-05-17 14:27:17 +02:00
Vincent Jacques 79365fe4bc De-activate our only intergration test, to pass on Travis-CI 2013-05-17 14:09:36 +02:00
Vincent Jacques 7f74a92b55 AuthenticatedUser.get_user_issues and Organization.get_issues (issue #166) 2013-05-17 13:52:49 +02:00
Vincent Jacques 1c4aec6891 Add parameters to AuthenticatedUser.get_issues (issue #166) 2013-05-17 13:42:43 +02:00
Vincent Jacques 97af2b6da2 Fix pagination with secret-key authentication (issue #158) 2013-04-25 14:31:51 +02:00
Vincent Jacques 10a567f62e Fix tests for #161 2013-04-25 09:51:37 +02:00
Vincent Jacques f5a01c1545 Fix tests for Python 3.3 (dictionary ordering...) 2013-04-22 23:01:16 +02:00
Vincent Jacques 73f9ae8f21 Merge branch 'topic/SpecificExceptions' into develop 2013-04-22 22:23:04 +02:00
Vincent Jacques eccc41097e Rename a file in a gist (issue #156) 2013-04-08 21:10:07 +02:00
Vincent Jacques 6861c5cd19 Delete file from gist (issue #156) 2013-04-08 21:07:17 +02:00
Vincent Jacques db5560bd65 Add a script to check copyrights with git log. And fix copyrights. 2013-03-29 16:54:15 +01:00
Vincent Jacques f266fed520 Fix tests for Python <= 2.6 2013-03-29 13:26:53 +01:00
Vincent Jacques c1d747a913 Refactor tests
We don't need to inspect the exception, so we can use
unittest.TestCase.assertRaises
2013-03-29 13:13:44 +01:00
Vincent Jacques 0bc368973a Raise a specific exception for non-existing objects (issue #152) 2013-03-29 13:10:59 +01:00
Vincent Jacques 7b3e4c15ed Raise a specific exception for bad credentials (issue #152) 2013-03-29 13:01:06 +01:00
Vincent Jacques e0db8cad4e pep8 2013-03-28 21:51:02 +01:00
Vincent Jacques 1c47be4e89 Document #pragma no covers (Issue #154) 2013-03-28 21:50:17 +01:00
Vincent Jacques 8a9afbb1aa Remove branches for hypothetical unknown Authorization headers 2013-03-28 21:49:39 +01:00
Vincent Jacques 1c67359a31 Improve test coverage a bit 2013-03-28 21:28:01 +01:00
Vincent Jacques 1d18bd66f3 Add a test that would have caught #153 2013-03-28 21:23:03 +01:00
Vincent Jacques b9d71fa787 Slightly improve coverage :-D 2013-03-28 21:05:19 +01:00
Vincent Jacques 1bb05fef01 Respect pep 8 2013-03-22 17:52:00 +01:00
Vincent Jacques d9b29851dd Fix tests for Python 2.5 2013-03-22 00:33:13 +01:00
Vincent Jacques f962bc71fe Fix tests for Python 2.5 2013-03-22 00:29:44 +01:00
Vincent Jacques 7a9c0b916c Fix tests on Python 3.3 (issue #149)
The output order of dicts has changed
2013-03-21 23:18:21 +01:00
Vincent Jacques 82ce7b1ee3 Fix tests for Python 3.2 on Windows 2013-03-21 22:06:24 +01:00
Vincent Jacques 1e99e7d5b2 Reduce 2to3 differences 2013-03-21 22:05:37 +01:00
Vincent Jacques da6bbdb694 Merge branch 'topic/Notifications' into develop 2013-03-19 23:14:29 +01:00