summaryrefslogtreecommitdiff
path: root/unittests.py
Commit message (Collapse)AuthorAgeFilesLines
* Include event name in UnhandledEvent's __repr__ outputDavid Pursehouse2016-02-291-0/+2
| | | | Change-Id: I7028026b67b432d9ac5a3c0bdf660a672ff12a89
* Bump pep8 to 1.5.7David Pursehouse2014-10-271-1/+2
| | | | | | And fix a couple of newly discovered warnings. Change-Id: I835d16ed94f2e20f003a2aa0b0370483d02e7926
* Add inline review support0.2.8Peter Theckanath2014-09-011-0/+39
| | | | | | Added API to send inline review Change-Id: Ifdcfbaea6ae4d8723d9566eaaf3c5dba5ff35617
* Replace deprecated assertEquals() with assertEqual()Peter Theckanath2014-09-011-176/+176
| | | | Change-Id: I7776c65f9c28b3cf05f2169696da0256f5cfc5b8
* Add message formatter class0.2.7David Pursehouse2014-06-191-0/+112
| | | | | | | Add a new helper class that can be used to format the messages that are sent to Gerrit via the review command. Change-Id: Ib8684d60788c8f19054bca6cfc707b25079395d3
* Revert "Remove support for Gerrit over ssh"David Pursehouse2014-05-291-1/+288
| | | | | | | | | | | | | | | | | | | | | The ssh interface is still being used and patches are being contributed [1]. It's easier to revert the removal on master than attempt to keep the support in a separate branch. This reverts commit f0b77968389966cd7bad0cac1fe7f04526eafde1. [1] https://github.com/sonyxperiadev/pygerrit/pull/21 Conflicts: README.rst example.py requirements.txt setup.py unittests.py Change-Id: I9e02208c57cb2022ff39cff6650101ed40c0519d
* Migrate setup to pbrDavid Pursehouse2014-05-021-23/+0
| | | | | | | | pbr provides better version handling, and automates the release notes and list of authors. This means we have to spend less time manually updating things. Change-Id: Ie79d706ec7a177f437b6bb0e38a9bded8bc4bb9e
* Remove support for Gerrit over sshDavid Pursehouse2014-04-281-287/+1
| | | | | | | | | From now only the REST API is supported. This makes installation of the package a bit lighter as we no longer depend on paramiko and pycrypto Change-Id: Ieda773d596fd43047c05895f3304690ddf709094
* Fix #8: Support the "topic-changed" stream eventDavid Pursehouse2013-09-111-1/+20
| | | | Change-Id: I70b9cbea1da20a1434eea39e3d8e85e94357b792
* Fix #7: Support the "reviewer-added" stream eventDavid Pursehouse2013-09-111-1/+25
| | | | Change-Id: I72ece72c08ddc6da31c14db35dd84f35d61d39ed
* Fix #6: Support the "merge-failed" stream eventDavid Pursehouse2013-09-111-1/+26
| | | | Change-Id: I3308b44dc1bbfcaa70e38cb4857c2241c551cfa4
* Fix #5: Move json parsing and error handling into the event factoryDavid Pursehouse2013-09-111-7/+13
| | | | | | | | | | Pass the raw string into the event factory and parse it to a json object there. If the string is not valid json, generate an error event. Add a unit test for handling of invalid json on the event stream. Change-Id: I209a89fd28c3a594b71443fc106e25d58c5cc1ea
* Fix #3: Don't treat unhandled event types as errorsDavid Pursehouse2013-09-111-1/+8
| | | | | | | | If an unknown event is received on the event stream, for example if a new event has been added in a later version of Gerrit, do not raise an error. Instead, generate an "UnhandledEvent" event. Change-Id: Ia1902bf4a54883011b7ad3e004f58a2ba8739b21
* Fix #4: Keep event's raw json data in the event objectDavid Pursehouse2013-09-111-1/+1
| | | | | | | | If any future versions of Gerrit add data elements that are not encapsulated by the event class, clients will be able to access them via the raw json data. Change-Id: Ia689acb808f9d200f53b86c60f024e865dd12a18
* Don't put copyright and license headers in Python module docstringsDavid Pursehouse2013-08-071-25/+23
| | | | | | | | | | | | | | If the copyright and license headers are in module docstrings, they appear in the generated API documentation pages and it looks crappy. Instead, put the headers in regular Python comments. Thus each file still has the required copyright and license notice, but it is not included everywhere in the generated documentation. The documentation still includes an automatically generated copyright notice at the bottom of each page. Change-Id: Ibc5f4ca221c0a6de26f04f3b4511d8991e28b663
* Fix pylint warningsDavid Pursehouse2013-08-061-1/+1
| | | | | | | | | | | | | | | - Add missing docstrings that the PEP-257 checker did not report. - Add explicit parameters on `GerritSSHClient.exec_command` method overridden from `paramiko.SSHClient.exec_command`. - Disable warning that the `GerritEvent` class does not have a member named `name`. This member is initialised by the event factory when a derived class is instantiated. - Capitalise constant `REQUIRES`. Change-Id: I8880e061b51e12145ee55e0cd86dab930970cde5
* Add a unit test to ensure dependency package version consistencyDavid Pursehouse2013-08-061-0/+22
| | | | | | | | Add a test to make sure that if depencency package versions are updated that they are updated to consistent versions in both requirements.txt and setup.py Change-Id: I855af3246bfb1013f8a462c99fb2d15ef6454998
* Fix hostname in unit testsDavid Pursehouse2012-10-171-1/+1
| | | | | | Change hostname "review.sonyericsson.net" to "review". Change-Id: I361873a4c9eb20e44b2c6f0642acc63bdd4e1d16
* Add license informationDavid Pursehouse2012-09-201-1/+25
| | | | Change-Id: I25ce3fafe7a51d0221f66fe30b2fb7cc8115c4aa
* Simplify the unit test structureDavid Pursehouse2012-09-201-0/+216
The structure of the unit tests, copied from another module, is overly complicated for pygerrit. Change-Id: I05d1077a624e68e72a97a4a5e3c8892768d3ad17