{"action":"created","issue":{"url":"https://api.github.com/repos/webcompat/webcompat.com/issues/774","labels_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/774/labels{/name}","comments_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/774/comments","events_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/774/events","html_url":"https://github.com/webcompat/webcompat.com/pull/774","id":111862658,"number":774,"title":"Fixes #712: Mock (some of the) communication with GitHub API","user":{"login":"miketaylr","id":67283,"avatar_url":"https://avatars.githubusercontent.com/u/67283?v=3","gravatar_id":"","url":"https://api.github.com/users/miketaylr","html_url":"https://github.com/miketaylr","followers_url":"https://api.github.com/users/miketaylr/followers","following_url":"https://api.github.com/users/miketaylr/following{/other_user}","gists_url":"https://api.github.com/users/miketaylr/gists{/gist_id}","starred_url":"https://api.github.com/users/miketaylr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miketaylr/subscriptions","organizations_url":"https://api.github.com/users/miketaylr/orgs","repos_url":"https://api.github.com/users/miketaylr/repos","events_url":"https://api.github.com/users/miketaylr/events{/privacy}","received_events_url":"https://api.github.com/users/miketaylr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/webcompat/webcompat.com/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-16T16:13:18Z","updated_at":"2015-10-21T15:48:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/webcompat/webcompat.com/pulls/774","html_url":"https://github.com/webcompat/webcompat.com/pull/774","diff_url":"https://github.com/webcompat/webcompat.com/pull/774.diff","patch_url":"https://github.com/webcompat/webcompat.com/pull/774.patch"},"body":"r? @karlcow \r\n\r\nHere's the general strategy:\r\n\r\nWe have a `@mockable_repsponse` decorator to add to an API endpoint. \r\n\r\nIF we're in test mode (`python run.py -t`), instead of making the request to GitHub, we serve a file from `test/fixtures/` instead.\r\n\r\nLimitations: \r\n* Creating fixtures files is an annoying manual process. I plan on writing a script to generate/record these in the future. #777.\r\n* We're not yet mocking login/logout w/ GitHub. #776.\r\n* We're only mocking READs from the API and not WRITEs. #778.\r\n* I need to write docs on adding new fixture files until we have a script to generate them. #775.\r\n\r\nI needed to remove a few tests from our label tests, but will open an issue to figure that out. Solving the WRITE mocking will help, I think."},"comment":{"url":"https://api.github.com/repos/webcompat/webcompat.com/issues/comments/149939614","html_url":"https://github.com/webcompat/webcompat.com/pull/774#issuecomment-149939614","issue_url":"https://api.github.com/repos/webcompat/webcompat.com/issues/774","id":149939614,"user":{"login":"miketaylr","id":67283,"avatar_url":"https://avatars.githubusercontent.com/u/67283?v=3","gravatar_id":"","url":"https://api.github.com/users/miketaylr","html_url":"https://github.com/miketaylr","followers_url":"https://api.github.com/users/miketaylr/followers","following_url":"https://api.github.com/users/miketaylr/following{/other_user}","gists_url":"https://api.github.com/users/miketaylr/gists{/gist_id}","starred_url":"https://api.github.com/users/miketaylr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miketaylr/subscriptions","organizations_url":"https://api.github.com/users/miketaylr/orgs","repos_url":"https://api.github.com/users/miketaylr/repos","events_url":"https://api.github.com/users/miketaylr/events{/privacy}","received_events_url":"https://api.github.com/users/miketaylr/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T15:48:49Z","updated_at":"2015-10-21T15:48:49Z","body":"(Hmm, I'm not sure about that grunt error though. O_o)"}}