{"action":"closed","number":6,"pull_request":{"url":"https://api.github.com/repos/RPi-Distro/python-energenie/pulls/6","id":26957507,"html_url":"https://github.com/RPi-Distro/python-energenie/pull/6","diff_url":"https://github.com/RPi-Distro/python-energenie/pull/6.diff","patch_url":"https://github.com/RPi-Distro/python-energenie/pull/6.patch","issue_url":"https://api.github.com/repos/RPi-Distro/python-energenie/issues/6","number":6,"state":"closed","locked":false,"title":"add a simple test suite","user":{"login":"rjw57","id":146860,"avatar_url":"https://avatars.githubusercontent.com/u/146860?v=3","gravatar_id":"","url":"https://api.github.com/users/rjw57","html_url":"https://github.com/rjw57","followers_url":"https://api.github.com/users/rjw57/followers","following_url":"https://api.github.com/users/rjw57/following{/other_user}","gists_url":"https://api.github.com/users/rjw57/gists{/gist_id}","starred_url":"https://api.github.com/users/rjw57/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjw57/subscriptions","organizations_url":"https://api.github.com/users/rjw57/orgs","repos_url":"https://api.github.com/users/rjw57/repos","events_url":"https://api.github.com/users/rjw57/events{/privacy}","received_events_url":"https://api.github.com/users/rjw57/received_events","type":"User","site_admin":false},"body":"This PR adds a very simple test suite which checks that the appropriate GPIO\npins are twiddled when the API is used and includes a configuration for\nTravis-CI which can be used to check the module works with Python 2.7 and 3.2\n(see [1]).\n\nThe test suite makes use of unittest.mock (or, more precisely, the 2.7\nbackport) to mock RPi.GPIO allowing a) the test suite to be run on something\nother then the Pi (e.g. Travis) and b) to not require hardware monitoring of\nthe GPIO to verify logic.\n\nShould one want to extend the API at a later time to allow, e.g., multiple\nsockets per call to switch_{on,off}(), this test suite can at least verify that\nthe API hasn't broken.\n\nNo ego will be harmed if the PR isn't merged. It's possibly overkill to have a\ntest suite for a two-function package but it *is* good practice.\n\n[1] https://travis-ci.org/rjw57/energenie/builds/46191173\n[2] https://docs.python.org/3/library/unittest.mock.html","created_at":"2015-01-07T13:39:55Z","updated_at":"2016-06-09T10:07:43Z","closed_at":"2016-06-09T10:07:43Z","merged_at":null,"merge_commit_sha":"af6aa26bac7d6950425e91b6fa2dec46695e6763","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RPi-Distro/python-energenie/pulls/6/commits","review_comments_url":"https://api.github.com/repos/RPi-Distro/python-energenie/pulls/6/comments","review_comment_url":"https://api.github.com/repos/RPi-Distro/python-energenie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RPi-Distro/python-energenie/issues/6/comments","statuses_url":"https://api.github.com/repos/RPi-Distro/python-energenie/statuses/5d929a8a5250b7189dcbf8c706947e35a2f32b89","head":{"label":"rjw57:add-tests","ref":"add-tests","sha":"5d929a8a5250b7189dcbf8c706947e35a2f32b89","user":{"login":"rjw57","id":146860,"avatar_url":"https://avatars.githubusercontent.com/u/146860?v=3","gravatar_id":"","url":"https://api.github.com/users/rjw57","html_url":"https://github.com/rjw57","followers_url":"https://api.github.com/users/rjw57/followers","following_url":"https://api.github.com/users/rjw57/following{/other_user}","gists_url":"https://api.github.com/users/rjw57/gists{/gist_id}","starred_url":"https://api.github.com/users/rjw57/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjw57/subscriptions","organizations_url":"https://api.github.com/users/rjw57/orgs","repos_url":"https://api.github.com/users/rjw57/repos","events_url":"https://api.github.com/users/rjw57/events{/privacy}","received_events_url":"https://api.github.com/users/rjw57/received_events","type":"User","site_admin":false},"repo":{"id":28915191,"name":"energenie","full_name":"rjw57/energenie","owner":{"login":"rjw57","id":146860,"avatar_url":"https://avatars.githubusercontent.com/u/146860?v=3","gravatar_id":"","url":"https://api.github.com/users/rjw57","html_url":"https://github.com/rjw57","followers_url":"https://api.github.com/users/rjw57/followers","following_url":"https://api.github.com/users/rjw57/following{/other_user}","gists_url":"https://api.github.com/users/rjw57/gists{/gist_id}","starred_url":"https://api.github.com/users/rjw57/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjw57/subscriptions","organizations_url":"https://api.github.com/users/rjw57/orgs","repos_url":"https://api.github.com/users/rjw57/repos","events_url":"https://api.github.com/users/rjw57/events{/privacy}","received_events_url":"https://api.github.com/users/rjw57/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rjw57/energenie","description":"Remotely control power sockets from the Raspberry Pi","fork":true,"url":"https://api.github.com/repos/rjw57/energenie","forks_url":"https://api.github.com/repos/rjw57/energenie/forks","keys_url":"https://api.github.com/repos/rjw57/energenie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rjw57/energenie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rjw57/energenie/teams","hooks_url":"https://api.github.com/repos/rjw57/energenie/hooks","issue_events_url":"https://api.github.com/repos/rjw57/energenie/issues/events{/number}","events_url":"https://api.github.com/repos/rjw57/energenie/events","assignees_url":"https://api.github.com/repos/rjw57/energenie/assignees{/user}","branches_url":"https://api.github.com/repos/rjw57/energenie/branches{/branch}","tags_url":"https://api.github.com/repos/rjw57/energenie/tags","blobs_url":"https://api.github.com/repos/rjw57/energenie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rjw57/energenie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rjw57/energenie/git/refs{/sha}","trees_url":"https://api.github.com/repos/rjw57/energenie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rjw57/energenie/statuses/{sha}","languages_url":"https://api.github.com/repos/rjw57/energenie/languages","stargazers_url":"https://api.github.com/repos/rjw57/energenie/stargazers","contributors_url":"https://api.github.com/repos/rjw57/energenie/contributors","subscribers_url":"https://api.github.com/repos/rjw57/energenie/subscribers","subscription_url":"https://api.github.com/repos/rjw57/energenie/subscription","commits_url":"https://api.github.com/repos/rjw57/energenie/commits{/sha}","git_commits_url":"https://api.github.com/repos/rjw57/energenie/git/commits{/sha}","comments_url":"https://api.github.com/repos/rjw57/energenie/comments{/number}","issue_comment_url":"https://api.github.com/repos/rjw57/energenie/issues/comments{/number}","contents_url":"https://api.github.com/repos/rjw57/energenie/contents/{+path}","compare_url":"https://api.github.com/repos/rjw57/energenie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rjw57/energenie/merges","archive_url":"https://api.github.com/repos/rjw57/energenie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rjw57/energenie/downloads","issues_url":"https://api.github.com/repos/rjw57/energenie/issues{/number}","pulls_url":"https://api.github.com/repos/rjw57/energenie/pulls{/number}","milestones_url":"https://api.github.com/repos/rjw57/energenie/milestones{/number}","notifications_url":"https://api.github.com/repos/rjw57/energenie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rjw57/energenie/labels{/name}","releases_url":"https://api.github.com/repos/rjw57/energenie/releases{/id}","deployments_url":"https://api.github.com/repos/rjw57/energenie/deployments","created_at":"2015-01-07T13:17:55Z","updated_at":"2015-06-03T00:35:42Z","pushed_at":"2015-01-07T13:34:26Z","git_url":"git://github.com/rjw57/energenie.git","ssh_url":"git@github.com:rjw57/energenie.git","clone_url":"https://github.com/rjw57/energenie.git","svn_url":"https://github.com/rjw57/energenie","homepage":"https://pypi.python.org/pypi/energenie","size":446,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"RPi-Distro:master","ref":"master","sha":"fdf82d36b86dff35943bb00f73b915240f5bd68c","user":{"login":"RPi-Distro","id":12276469,"avatar_url":"https://avatars.githubusercontent.com/u/12276469?v=3","gravatar_id":"","url":"https://api.github.com/users/RPi-Distro","html_url":"https://github.com/RPi-Distro","followers_url":"https://api.github.com/users/RPi-Distro/followers","following_url":"https://api.github.com/users/RPi-Distro/following{/other_user}","gists_url":"https://api.github.com/users/RPi-Distro/gists{/gist_id}","starred_url":"https://api.github.com/users/RPi-Distro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RPi-Distro/subscriptions","organizations_url":"https://api.github.com/users/RPi-Distro/orgs","repos_url":"https://api.github.com/users/RPi-Distro/repos","events_url":"https://api.github.com/users/RPi-Distro/events{/privacy}","received_events_url":"https://api.github.com/users/RPi-Distro/received_events","type":"Organization","site_admin":false},"repo":{"id":25881473,"name":"python-energenie","full_name":"RPi-Distro/python-energenie","owner":{"login":"RPi-Distro","id":12276469,"avatar_url":"https://avatars.githubusercontent.com/u/12276469?v=3","gravatar_id":"","url":"https://api.github.com/users/RPi-Distro","html_url":"https://github.com/RPi-Distro","followers_url":"https://api.github.com/users/RPi-Distro/followers","following_url":"https://api.github.com/users/RPi-Distro/following{/other_user}","gists_url":"https://api.github.com/users/RPi-Distro/gists{/gist_id}","starred_url":"https://api.github.com/users/RPi-Distro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RPi-Distro/subscriptions","organizations_url":"https://api.github.com/users/RPi-Distro/orgs","repos_url":"https://api.github.com/users/RPi-Distro/repos","events_url":"https://api.github.com/users/RPi-Distro/events{/privacy}","received_events_url":"https://api.github.com/users/RPi-Distro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RPi-Distro/python-energenie","description":"Remotely control power sockets from the Raspberry Pi","fork":true,"url":"https://api.github.com/repos/RPi-Distro/python-energenie","forks_url":"https://api.github.com/repos/RPi-Distro/python-energenie/forks","keys_url":"https://api.github.com/repos/RPi-Distro/python-energenie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RPi-Distro/python-energenie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RPi-Distro/python-energenie/teams","hooks_url":"https://api.github.com/repos/RPi-Distro/python-energenie/hooks","issue_events_url":"https://api.github.com/repos/RPi-Distro/python-energenie/issues/events{/number}","events_url":"https://api.github.com/repos/RPi-Distro/python-energenie/events","assignees_url":"https://api.github.com/repos/RPi-Distro/python-energenie/assignees{/user}","branches_url":"https://api.github.com/repos/RPi-Distro/python-energenie/branches{/branch}","tags_url":"https://api.github.com/repos/RPi-Distro/python-energenie/tags","blobs_url":"https://api.github.com/repos/RPi-Distro/python-energenie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RPi-Distro/python-energenie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RPi-Distro/python-energenie/git/refs{/sha}","trees_url":"https://api.github.com/repos/RPi-Distro/python-energenie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RPi-Distro/python-energenie/statuses/{sha}","languages_url":"https://api.github.com/repos/RPi-Distro/python-energenie/languages","stargazers_url":"https://api.github.com/repos/RPi-Distro/python-energenie/stargazers","contributors_url":"https://api.github.com/repos/RPi-Distro/python-energenie/contributors","subscribers_url":"https://api.github.com/repos/RPi-Distro/python-energenie/subscribers","subscription_url":"https://api.github.com/repos/RPi-Distro/python-energenie/subscription","commits_url":"https://api.github.com/repos/RPi-Distro/python-energenie/commits{/sha}","git_commits_url":"https://api.github.com/repos/RPi-Distro/python-energenie/git/commits{/sha}","comments_url":"https://api.github.com/repos/RPi-Distro/python-energenie/comments{/number}","issue_comment_url":"https://api.github.com/repos/RPi-Distro/python-energenie/issues/comments{/number}","contents_url":"https://api.github.com/repos/RPi-Distro/python-energenie/contents/{+path}","compare_url":"https://api.github.com/repos/RPi-Distro/python-energenie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RPi-Distro/python-energenie/merges","archive_url":"https://api.github.com/repos/RPi-Distro/python-energenie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RPi-Distro/python-energenie/downloads","issues_url":"https://api.github.com/repos/RPi-Distro/python-energenie/issues{/number}","pulls_url":"https://api.github.com/repos/RPi-Distro/python-energenie/pulls{/number}","milestones_url":"https://api.github.com/repos/RPi-Distro/python-energenie/milestones{/number}","notifications_url":"https://api.github.com/repos/RPi-Distro/python-energenie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RPi-Distro/python-energenie/labels{/name}","releases_url":"https://api.github.com/repos/RPi-Distro/python-energenie/releases{/id}","deployments_url":"https://api.github.com/repos/RPi-Distro/python-energenie/deployments","created_at":"2014-10-28T17:32:31Z","updated_at":"2016-05-15T20:32:40Z","pushed_at":"2016-04-11T08:14:32Z","git_url":"git://github.com/RPi-Distro/python-energenie.git","ssh_url":"git@github.com:RPi-Distro/python-energenie.git","clone_url":"https://github.com/RPi-Distro/python-energenie.git","svn_url":"https://github.com/RPi-Distro/python-energenie","homepage":"https://pypi.python.org/pypi/energenie","size":884,"stargazers_count":14,"watchers_count":14,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":3,"forks":9,"open_issues":3,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RPi-Distro/python-energenie/pulls/6"},"html":{"href":"https://github.com/RPi-Distro/python-energenie/pull/6"},"issue":{"href":"https://api.github.com/repos/RPi-Distro/python-energenie/issues/6"},"comments":{"href":"https://api.github.com/repos/RPi-Distro/python-energenie/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/RPi-Distro/python-energenie/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/RPi-Distro/python-energenie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RPi-Distro/python-energenie/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/RPi-Distro/python-energenie/statuses/5d929a8a5250b7189dcbf8c706947e35a2f32b89"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":2,"review_comments":0,"commits":4,"additions":165,"deletions":0,"changed_files":6}}
{"actor":{"display_login":"bennuttall"}}