{"action":"created","issue":{"url":"https://api.github.com/repos/openlabs/Microsoft-Translator-Python-API/issues/20","labels_url":"https://api.github.com/repos/openlabs/Microsoft-Translator-Python-API/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/openlabs/Microsoft-Translator-Python-API/issues/20/comments","events_url":"https://api.github.com/repos/openlabs/Microsoft-Translator-Python-API/issues/20/events","html_url":"https://github.com/openlabs/Microsoft-Translator-Python-API/issues/20","id":78021532,"number":20,"title":"Unit test fail because of external factor (Azure Account)","user":{"login":"Ecno92","id":5213399,"avatar_url":"https://avatars.githubusercontent.com/u/5213399?v=3","gravatar_id":"","url":"https://api.github.com/users/Ecno92","html_url":"https://github.com/Ecno92","followers_url":"https://api.github.com/users/Ecno92/followers","following_url":"https://api.github.com/users/Ecno92/following{/other_user}","gists_url":"https://api.github.com/users/Ecno92/gists{/gist_id}","starred_url":"https://api.github.com/users/Ecno92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ecno92/subscriptions","organizations_url":"https://api.github.com/users/Ecno92/orgs","repos_url":"https://api.github.com/users/Ecno92/repos","events_url":"https://api.github.com/users/Ecno92/events{/privacy}","received_events_url":"https://api.github.com/users/Ecno92/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-19T10:01:11Z","updated_at":"2015-05-19T13:21:43Z","closed_at":null,"body":"I just saw that recent tests were failing because there was something wrong with the Amazon account (zero balance)\r\n\r\nSee: https://travis-ci.org/openlabs/Microsoft-Translator-Python-API/builds/62703439\r\n\r\n```\r\nmicrosofttranslator.TranslateApiException: The Azure Market Place Translator Subscription associated with the request credentials has zero balance. : ID=5641.V2_Json.Translate.2820E7BA\r\n```\r\n\r\nThe test should not be dependent on a live service. We should use mocks instead. \r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/15899651-unit-test-fail-because-of-external-factor-azure-account?utm_campaign=plugin&utm_content=tracker%2F588721&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F588721&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/openlabs/Microsoft-Translator-Python-API/issues/comments/103486925","html_url":"https://github.com/openlabs/Microsoft-Translator-Python-API/issues/20#issuecomment-103486925","issue_url":"https://api.github.com/repos/openlabs/Microsoft-Translator-Python-API/issues/20","id":103486925,"user":{"login":"sharoonthomas","id":305807,"avatar_url":"https://avatars.githubusercontent.com/u/305807?v=3","gravatar_id":"","url":"https://api.github.com/users/sharoonthomas","html_url":"https://github.com/sharoonthomas","followers_url":"https://api.github.com/users/sharoonthomas/followers","following_url":"https://api.github.com/users/sharoonthomas/following{/other_user}","gists_url":"https://api.github.com/users/sharoonthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/sharoonthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharoonthomas/subscriptions","organizations_url":"https://api.github.com/users/sharoonthomas/orgs","repos_url":"https://api.github.com/users/sharoonthomas/repos","events_url":"https://api.github.com/users/sharoonthomas/events{/privacy}","received_events_url":"https://api.github.com/users/sharoonthomas/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T13:21:43Z","updated_at":"2015-05-19T13:21:43Z","body":"@Ecno92 while I agree that mock is the ideal case, there is incentive to testing with the service itself. We discovered the module had issues with an API microsoft changed some time ago for example.\r\n\r\nTo prevent abuse, I have moved the key from source code (test file) to an environment variable on Travis. This will make the builds fail for pull requests, but once merged they should pass."}}