{"action":"created","issue":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/1682","repository_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot","labels_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/1682/labels{/name}","comments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/1682/comments","events_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/1682/events","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/1682","id":168380017,"number":1682,"title":"[DEV FEATURE] Test framework .... beginning","user":{"login":"DayBr3ak","id":6201498,"avatar_url":"https://avatars.githubusercontent.com/u/6201498?v=3","gravatar_id":"","url":"https://api.github.com/users/DayBr3ak","html_url":"https://github.com/DayBr3ak","followers_url":"https://api.github.com/users/DayBr3ak/followers","following_url":"https://api.github.com/users/DayBr3ak/following{/other_user}","gists_url":"https://api.github.com/users/DayBr3ak/gists{/gist_id}","starred_url":"https://api.github.com/users/DayBr3ak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DayBr3ak/subscriptions","organizations_url":"https://api.github.com/users/DayBr3ak/orgs","repos_url":"https://api.github.com/users/DayBr3ak/repos","events_url":"https://api.github.com/users/DayBr3ak/events{/privacy}","received_events_url":"https://api.github.com/users/DayBr3ak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-07-29T18:00:18Z","updated_at":"2016-07-31T05:17:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/1682","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/1682","diff_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/1682.diff","patch_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/1682.patch"},"body":"Short Description: \r\n\r\nTrying to add unit testing. So it's a draft for now, I just used ApiWrapper as an example to show you what I've done and get feedbacks. And more importantly, should I continue with this style ?\r\n\r\nI added a .travis.yml entry, I'm not sure if it is going to work, let's see"},"comment":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/comments/236411137","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/1682#issuecomment-236411137","issue_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/1682","id":236411137,"user":{"login":"TheSavior","id":249164,"avatar_url":"https://avatars.githubusercontent.com/u/249164?v=3","gravatar_id":"","url":"https://api.github.com/users/TheSavior","html_url":"https://github.com/TheSavior","followers_url":"https://api.github.com/users/TheSavior/followers","following_url":"https://api.github.com/users/TheSavior/following{/other_user}","gists_url":"https://api.github.com/users/TheSavior/gists{/gist_id}","starred_url":"https://api.github.com/users/TheSavior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheSavior/subscriptions","organizations_url":"https://api.github.com/users/TheSavior/orgs","repos_url":"https://api.github.com/users/TheSavior/repos","events_url":"https://api.github.com/users/TheSavior/events{/privacy}","received_events_url":"https://api.github.com/users/TheSavior/received_events","type":"User","site_admin":false},"created_at":"2016-07-31T05:17:10Z","updated_at":"2016-07-31T05:17:10Z","body":"I haven't gone through this code very much, just a cursory glance. My thoughts:\r\n\r\nI think there is a lot we can test in this bot. For example, as you say, the steppers can be tested that they walk an expected path and call the api to update location with the right data. \r\n\r\nIn regards to things that parse api responses, I think those functions should be pulled out so that other parts of the bot can use them without having to duplicate that logic. Those individual functions can never truly know if they will work when they are running, as @douglascamata is concerned about. However, that is a class of things that will always have problems. I think we can get some value out of having tests for those types of functions. If the api response *does* change and it fails in production, we can get the new response and update our test to make sure it works in all the cases. \r\n\r\nIn regards to unittest and what I have now, I would *definitely* not assume that I know what I'm doing in python. Haha. But we should make sure we are using the same test framework for everything. If `nosetest` is the right approach, we should change the tests that I wrote to use that. I also don't particularly have any thoughts on where the files should live.\r\n\r\nAll that being said, I defer this pull request to @douglascamata's approval, he is significantly more familiar with python and some of the choices here than I am."}}
{"actor":{"display_login":"TheSavior"}}