{"action":"created","issue":{"url":"https://api.github.com/repos/tulul/tululbot/issues/14","labels_url":"https://api.github.com/repos/tulul/tululbot/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/tulul/tululbot/issues/14/comments","events_url":"https://api.github.com/repos/tulul/tululbot/issues/14/events","html_url":"https://github.com/tulul/tululbot/pull/14","id":108904608,"number":14,"title":"Create automated tests","user":{"login":"kemskems","id":3627895,"avatar_url":"https://avatars.githubusercontent.com/u/3627895?v=3","gravatar_id":"","url":"https://api.github.com/users/kemskems","html_url":"https://github.com/kemskems","followers_url":"https://api.github.com/users/kemskems/followers","following_url":"https://api.github.com/users/kemskems/following{/other_user}","gists_url":"https://api.github.com/users/kemskems/gists{/gist_id}","starred_url":"https://api.github.com/users/kemskems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kemskems/subscriptions","organizations_url":"https://api.github.com/users/kemskems/orgs","repos_url":"https://api.github.com/users/kemskems/repos","events_url":"https://api.github.com/users/kemskems/events{/privacy}","received_events_url":"https://api.github.com/users/kemskems/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-29T16:16:19Z","updated_at":"2015-09-30T13:32:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tulul/tululbot/pulls/14","html_url":"https://github.com/tulul/tululbot/pull/14","diff_url":"https://github.com/tulul/tululbot/pull/14.diff","patch_url":"https://github.com/tulul/tululbot/pull/14.patch"},"body":"See #13.\r\n\r\nI used [Pytest](http://pytest.org/latest/) library for testing since I've heard many good things about it. To run the tests, simply run `py.test`.\r\n\r\n**Summary:**\r\n- Renamed `app.py` to `tululbot.py` to distinguish the module and the actual application object.\r\n- Use Flask's built in application logger.\r\n- Used [application factory pattern](http://flask.pocoo.org/docs/0.10/patterns/appfactories/) to make it easier injecting configuration for testing purposes. Without application factory pattern, I couldn't think any elegant way of configuring the app for testing. This is the best solution I've come up with. Suggestions are welcomed :-)\r\n- Update Procfile to use `default_app` application object. This `default_app` gets its configuration from the environment variables, as usual.\r\n\r\n**Caveat:**\r\n- The command to run the app locally is now `python tululbot.py`. It's slightly longer than the previous one."},"comment":{"url":"https://api.github.com/repos/tulul/tululbot/issues/comments/144398094","html_url":"https://github.com/tulul/tululbot/pull/14#issuecomment-144398094","issue_url":"https://api.github.com/repos/tulul/tululbot/issues/14","id":144398094,"user":{"login":"wazaundtechnik","id":14859957,"avatar_url":"https://avatars.githubusercontent.com/u/14859957?v=3","gravatar_id":"","url":"https://api.github.com/users/wazaundtechnik","html_url":"https://github.com/wazaundtechnik","followers_url":"https://api.github.com/users/wazaundtechnik/followers","following_url":"https://api.github.com/users/wazaundtechnik/following{/other_user}","gists_url":"https://api.github.com/users/wazaundtechnik/gists{/gist_id}","starred_url":"https://api.github.com/users/wazaundtechnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wazaundtechnik/subscriptions","organizations_url":"https://api.github.com/users/wazaundtechnik/orgs","repos_url":"https://api.github.com/users/wazaundtechnik/repos","events_url":"https://api.github.com/users/wazaundtechnik/events{/privacy}","received_events_url":"https://api.github.com/users/wazaundtechnik/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T13:32:05Z","updated_at":"2015-09-30T13:32:05Z","body":"I am sorry kems, could you please rebase with master upstream and edit the travis test yml accordingly?"}}