* Adds `get_issue_events` to `PullRequest` object
* Add unit test for
* Fix PullRequest.get_issue_events unit test
Use actual event ids...
* Fix missing import on PullRequest.
I wish the unit tests would run in Python3...
* Add PulReqeust.testGetIssueEvents ReplayData
* Updating replay data to use developer's personal credentials.
Invitations contain information about the user they are for, and
which user invited them, so export that too.
During invesigating attmepting to test the new attributes of Invitation,
it was discovered that there are no code paths to fetch them, so add
AuthenticatedUser.get_invitations(). The test added can do double duty.
The Retry test class was importing Repository directly, which had the
side effect of masking the tests.Repository import in AllTests with
github.Repository. Switch to importing github only, which is safe. As a
drive-by, switch to using self.assertRaises for one of the tests.
GitRelease.upload_asset() calculates the name based on the filename, and
doesn't allow it to be overridden. Add a new name argument that is used
if it is set. Drive by changing the default of the content_type argument
to NotSet.
Closes#1095
The role parameter is set to NotSet by default
but the assertion only allowed str and unicode.
So it would always fail. Add NotSet to the assertion
to allow calling the function without a role.
Signed-off-by: Pascal Bach <pascal.bach@nextrem.ch>
The path requested in Repository.get_contents() is appended to the URL,
so the root path should be requested with the empty string. If path is
'/', set it to the empty string. Copy the replay data from the original
test, since it is identical.
Drive-by renaming the test to include the missing 's'.
Closes#1059
# Problem #
The `.whl` available on PyPi for this repository contains its entire `tests` submodule.
The total size of the `pygithub` module is less than `1mb` without tests and `>23mb` with.
Previous discussions on this topic indicated the removal of tests would be accepted if someone created a pull request to do so: https://github.com/PyGithub/PyGithub/issues/672
This is that pull request! 😄
# Solution/Implementation #
- Moved "tests" to root of the repository ( outside the package )
- Added `tests.` module path to the imports in `AllTests.py`
- Updated `setup.py`
- Removed `package_data` from product
- Removed "tests" from packages definition
- Repointed `test_suite` to new location
- Updated `travis.yml`
- Added conditional ( if not `py2.7` ) conversion of code to `py3`
_... apologies for all the failed build spam below - new to working with Travis CI / had some gotcha moments!_
This is a continuation of the work started by @allevin on https://github.com/PyGithub/PyGithub/pull/860.
I have refactored the testing Framework to use the `httpretty` library in order to use the urllib3 retry feature and therefore be able to test it.
Please refer to https://github.com/PyGithub/PyGithub/pull/860 for additional context.
cc: @allevin @mfonville @jrouquie @sfdye
Closes#757Closes#860
PullRequest.get_review_comments() works with no arguments passed due to
if short circuiting, but as soon as you pass since, you get an exception
since datetime wasn't imported. Import it, and add a test case for good
measure.
Closes#1004
#664 got rid of most of httplib and replaced it with requests.
This is the last place it was used. It makes a more coherent code base I think.
Tests are ok locally.
Added support for the traffic endpoints found at https://developer.github.com/v3/repos/traffic/.
We added four functions to the Repository class (one for each of the endpoints) with corresponding unit tests.
Fixes#926
When there is no link header sent, this signifies that this is the only
page of results. If data is empty, or only contains a list of items, we
should count them, but this can be defeated -- if the returned data
contains a total_count key, we should use it. This also uncovered a bug
in the test suite for searching topics.
Closes#960