{"action":"opened","issue":{"url":"https://api.github.com/repos/zotero/zotero/issues/699","labels_url":"https://api.github.com/repos/zotero/zotero/issues/699/labels{/name}","comments_url":"https://api.github.com/repos/zotero/zotero/issues/699/comments","events_url":"https://api.github.com/repos/zotero/zotero/issues/699/events","html_url":"https://github.com/zotero/zotero/issues/699","id":68499356,"number":699,"title":"Mock external services in tests","user":{"login":"dstillman","id":783082,"avatar_url":"https://avatars.githubusercontent.com/u/783082?v=3","gravatar_id":"","url":"https://api.github.com/users/dstillman","html_url":"https://github.com/dstillman","followers_url":"https://api.github.com/users/dstillman/followers","following_url":"https://api.github.com/users/dstillman/following{/other_user}","gists_url":"https://api.github.com/users/dstillman/gists{/gist_id}","starred_url":"https://api.github.com/users/dstillman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstillman/subscriptions","organizations_url":"https://api.github.com/users/dstillman/orgs","repos_url":"https://api.github.com/users/dstillman/repos","events_url":"https://api.github.com/users/dstillman/events{/privacy}","received_events_url":"https://api.github.com/users/dstillman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-14T21:16:02Z","updated_at":"2015-04-14T21:16:02Z","closed_at":null,"body":"Our Travis tests are currently failing [all the time](https://travis-ci.org/zotero/zotero/builds) for reasons that have nothing to do with the code under test. Right now, for example, [we're failing](https://travis-ci.org/zotero/zotero/jobs/58499872) because of a mismatch in a title returned from an ISBN lookup. That was caused by [a translator issue](https://github.com/zotero/translators/commit/81fd1c9a99ef30b51603261db95698adc4aa5661), and it's at best distracting and at worst unnecessarily alarming to have it showing up on random commits and pull requests. I'd say we want to avoid external services almost entirely in Travis and just have them for local test runs, which the main developers should be doing all the time. In my view, Travis tests should almost always be passing on the main branch, with failures limited to unexpected side effects and untested pull requests.\r\n\r\nWe can create a utility function using [Sinon](http://sinonjs.org/) to mock ``Zotero.HTTP.request()`` for various things, but I'm not sure how we want to handle things that depend on translators, and particularly a case like this where it wasn't even that the LoC MARC response changed, but that a different site was being used entirely.\r\n\r\n@simonster, @aurimasv, thoughts?"}}