{"action":"created","comment":{"url":"https://api.github.com/repos/7lb/step_tracker/pulls/comments/46034094","id":46034094,"diff_hunk":"@@ -20,38 +20,145 @@ def setUpClass(cls):\n             (\"name\", \"word\"),\n             (\"leeloo\", \"multipass\"),\n         )\n-        populate_db(DBFILE, map(lambda t: (t[0], hash_pwd(t[1])), cls.users))\n+        cls.url_v1 = \"http://127.0.0.1:5000/v1/days\"\n+        cls.url_v2 = \"http://127.0.0.1:5000/v2/users/{0}/days\"\n+        populate_db(DBFILE, map(\n+            lambda t: (t[0], hash_pwd(t[1])),\n+            cls.users))\n \n     def setUp(self):\n         clear_db(DBFILE)","path":"test_tracker.py","position":21,"original_position":21,"commit_id":"8b4b2644b84edccd3bfbac2c5adceb404ac3f03b","original_commit_id":"8b4b2644b84edccd3bfbac2c5adceb404ac3f03b","user":{"login":"lmancini","id":829448,"avatar_url":"https://avatars.githubusercontent.com/u/829448?v=3","gravatar_id":"","url":"https://api.github.com/users/lmancini","html_url":"https://github.com/lmancini","followers_url":"https://api.github.com/users/lmancini/followers","following_url":"https://api.github.com/users/lmancini/following{/other_user}","gists_url":"https://api.github.com/users/lmancini/gists{/gist_id}","starred_url":"https://api.github.com/users/lmancini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmancini/subscriptions","organizations_url":"https://api.github.com/users/lmancini/orgs","repos_url":"https://api.github.com/users/lmancini/repos","events_url":"https://api.github.com/users/lmancini/events{/privacy}","received_events_url":"https://api.github.com/users/lmancini/received_events","type":"User","site_admin":false},"body":"Ho dato un'occhiata ai test e a `clear_db`, e direi che il rischio che ti dicevo l'altro giorno a voce non c'è (ovvero, la possibilità che fallisca la `tearDown` lasciando il db in stato inconsistente).  In questo senso ti proporrei di spostare la `clear_db` in `tearDown`, senza più definire la `setUp`.  I test dovrebbero tutti continuare a funzionare e il codice è più chiaro (la teardown fa cleanup).","created_at":"2015-11-27T10:24:19Z","updated_at":"2015-11-27T10:24:19Z","html_url":"https://github.com/7lb/step_tracker/pull/4#discussion_r46034094","pull_request_url":"https://api.github.com/repos/7lb/step_tracker/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/7lb/step_tracker/pulls/comments/46034094"},"html":{"href":"https://github.com/7lb/step_tracker/pull/4#discussion_r46034094"},"pull_request":{"href":"https://api.github.com/repos/7lb/step_tracker/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/7lb/step_tracker/pulls/4","id":51899104,"html_url":"https://github.com/7lb/step_tracker/pull/4","diff_url":"https://github.com/7lb/step_tracker/pull/4.diff","patch_url":"https://github.com/7lb/step_tracker/pull/4.patch","issue_url":"https://api.github.com/repos/7lb/step_tracker/issues/4","number":4,"state":"open","locked":false,"title":"Add tests","user":{"login":"7lb","id":7152790,"avatar_url":"https://avatars.githubusercontent.com/u/7152790?v=3","gravatar_id":"","url":"https://api.github.com/users/7lb","html_url":"https://github.com/7lb","followers_url":"https://api.github.com/users/7lb/followers","following_url":"https://api.github.com/users/7lb/following{/other_user}","gists_url":"https://api.github.com/users/7lb/gists{/gist_id}","starred_url":"https://api.github.com/users/7lb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/7lb/subscriptions","organizations_url":"https://api.github.com/users/7lb/orgs","repos_url":"https://api.github.com/users/7lb/repos","events_url":"https://api.github.com/users/7lb/events{/privacy}","received_events_url":"https://api.github.com/users/7lb/received_events","type":"User","site_admin":false},"body":"Aggiunge vari test per il server di tracking","created_at":"2015-11-26T11:03:58Z","updated_at":"2015-11-27T10:24:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8132f03f7097e06736d3a0d1186c45b40a365acf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/7lb/step_tracker/pulls/4/commits","review_comments_url":"https://api.github.com/repos/7lb/step_tracker/pulls/4/comments","review_comment_url":"https://api.github.com/repos/7lb/step_tracker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/7lb/step_tracker/issues/4/comments","statuses_url":"https://api.github.com/repos/7lb/step_tracker/statuses/8b4b2644b84edccd3bfbac2c5adceb404ac3f03b","head":{"label":"7lb:add_tests","ref":"add_tests","sha":"8b4b2644b84edccd3bfbac2c5adceb404ac3f03b","user":{"login":"7lb","id":7152790,"avatar_url":"https://avatars.githubusercontent.com/u/7152790?v=3","gravatar_id":"","url":"https://api.github.com/users/7lb","html_url":"https://github.com/7lb","followers_url":"https://api.github.com/users/7lb/followers","following_url":"https://api.github.com/users/7lb/following{/other_user}","gists_url":"https://api.github.com/users/7lb/gists{/gist_id}","starred_url":"https://api.github.com/users/7lb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/7lb/subscriptions","organizations_url":"https://api.github.com/users/7lb/orgs","repos_url":"https://api.github.com/users/7lb/repos","events_url":"https://api.github.com/users/7lb/events{/privacy}","received_events_url":"https://api.github.com/users/7lb/received_events","type":"User","site_admin":false},"repo":{"id":46806258,"name":"step_tracker","full_name":"7lb/step_tracker","owner":{"login":"7lb","id":7152790,"avatar_url":"https://avatars.githubusercontent.com/u/7152790?v=3","gravatar_id":"","url":"https://api.github.com/users/7lb","html_url":"https://github.com/7lb","followers_url":"https://api.github.com/users/7lb/followers","following_url":"https://api.github.com/users/7lb/following{/other_user}","gists_url":"https://api.github.com/users/7lb/gists{/gist_id}","starred_url":"https://api.github.com/users/7lb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/7lb/subscriptions","organizations_url":"https://api.github.com/users/7lb/orgs","repos_url":"https://api.github.com/users/7lb/repos","events_url":"https://api.github.com/users/7lb/events{/privacy}","received_events_url":"https://api.github.com/users/7lb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/7lb/step_tracker","description":"","fork":false,"url":"https://api.github.com/repos/7lb/step_tracker","forks_url":"https://api.github.com/repos/7lb/step_tracker/forks","keys_url":"https://api.github.com/repos/7lb/step_tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/7lb/step_tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/7lb/step_tracker/teams","hooks_url":"https://api.github.com/repos/7lb/step_tracker/hooks","issue_events_url":"https://api.github.com/repos/7lb/step_tracker/issues/events{/number}","events_url":"https://api.github.com/repos/7lb/step_tracker/events","assignees_url":"https://api.github.com/repos/7lb/step_tracker/assignees{/user}","branches_url":"https://api.github.com/repos/7lb/step_tracker/branches{/branch}","tags_url":"https://api.github.com/repos/7lb/step_tracker/tags","blobs_url":"https://api.github.com/repos/7lb/step_tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/7lb/step_tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/7lb/step_tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/7lb/step_tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/7lb/step_tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/7lb/step_tracker/languages","stargazers_url":"https://api.github.com/repos/7lb/step_tracker/stargazers","contributors_url":"https://api.github.com/repos/7lb/step_tracker/contributors","subscribers_url":"https://api.github.com/repos/7lb/step_tracker/subscribers","subscription_url":"https://api.github.com/repos/7lb/step_tracker/subscription","commits_url":"https://api.github.com/repos/7lb/step_tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/7lb/step_tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/7lb/step_tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/7lb/step_tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/7lb/step_tracker/contents/{+path}","compare_url":"https://api.github.com/repos/7lb/step_tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/7lb/step_tracker/merges","archive_url":"https://api.github.com/repos/7lb/step_tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/7lb/step_tracker/downloads","issues_url":"https://api.github.com/repos/7lb/step_tracker/issues{/number}","pulls_url":"https://api.github.com/repos/7lb/step_tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/7lb/step_tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/7lb/step_tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/7lb/step_tracker/labels{/name}","releases_url":"https://api.github.com/repos/7lb/step_tracker/releases{/id}","created_at":"2015-11-24T17:06:49Z","updated_at":"2015-11-24T17:07:21Z","pushed_at":"2015-11-27T09:46:40Z","git_url":"git://github.com/7lb/step_tracker.git","ssh_url":"git@github.com:7lb/step_tracker.git","clone_url":"https://github.com/7lb/step_tracker.git","svn_url":"https://github.com/7lb/step_tracker","homepage":null,"size":24,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"7lb:master","ref":"master","sha":"62b771a549e764bdcb1491aee1c00d2da4b74a12","user":{"login":"7lb","id":7152790,"avatar_url":"https://avatars.githubusercontent.com/u/7152790?v=3","gravatar_id":"","url":"https://api.github.com/users/7lb","html_url":"https://github.com/7lb","followers_url":"https://api.github.com/users/7lb/followers","following_url":"https://api.github.com/users/7lb/following{/other_user}","gists_url":"https://api.github.com/users/7lb/gists{/gist_id}","starred_url":"https://api.github.com/users/7lb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/7lb/subscriptions","organizations_url":"https://api.github.com/users/7lb/orgs","repos_url":"https://api.github.com/users/7lb/repos","events_url":"https://api.github.com/users/7lb/events{/privacy}","received_events_url":"https://api.github.com/users/7lb/received_events","type":"User","site_admin":false},"repo":{"id":46806258,"name":"step_tracker","full_name":"7lb/step_tracker","owner":{"login":"7lb","id":7152790,"avatar_url":"https://avatars.githubusercontent.com/u/7152790?v=3","gravatar_id":"","url":"https://api.github.com/users/7lb","html_url":"https://github.com/7lb","followers_url":"https://api.github.com/users/7lb/followers","following_url":"https://api.github.com/users/7lb/following{/other_user}","gists_url":"https://api.github.com/users/7lb/gists{/gist_id}","starred_url":"https://api.github.com/users/7lb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/7lb/subscriptions","organizations_url":"https://api.github.com/users/7lb/orgs","repos_url":"https://api.github.com/users/7lb/repos","events_url":"https://api.github.com/users/7lb/events{/privacy}","received_events_url":"https://api.github.com/users/7lb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/7lb/step_tracker","description":"","fork":false,"url":"https://api.github.com/repos/7lb/step_tracker","forks_url":"https://api.github.com/repos/7lb/step_tracker/forks","keys_url":"https://api.github.com/repos/7lb/step_tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/7lb/step_tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/7lb/step_tracker/teams","hooks_url":"https://api.github.com/repos/7lb/step_tracker/hooks","issue_events_url":"https://api.github.com/repos/7lb/step_tracker/issues/events{/number}","events_url":"https://api.github.com/repos/7lb/step_tracker/events","assignees_url":"https://api.github.com/repos/7lb/step_tracker/assignees{/user}","branches_url":"https://api.github.com/repos/7lb/step_tracker/branches{/branch}","tags_url":"https://api.github.com/repos/7lb/step_tracker/tags","blobs_url":"https://api.github.com/repos/7lb/step_tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/7lb/step_tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/7lb/step_tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/7lb/step_tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/7lb/step_tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/7lb/step_tracker/languages","stargazers_url":"https://api.github.com/repos/7lb/step_tracker/stargazers","contributors_url":"https://api.github.com/repos/7lb/step_tracker/contributors","subscribers_url":"https://api.github.com/repos/7lb/step_tracker/subscribers","subscription_url":"https://api.github.com/repos/7lb/step_tracker/subscription","commits_url":"https://api.github.com/repos/7lb/step_tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/7lb/step_tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/7lb/step_tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/7lb/step_tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/7lb/step_tracker/contents/{+path}","compare_url":"https://api.github.com/repos/7lb/step_tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/7lb/step_tracker/merges","archive_url":"https://api.github.com/repos/7lb/step_tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/7lb/step_tracker/downloads","issues_url":"https://api.github.com/repos/7lb/step_tracker/issues{/number}","pulls_url":"https://api.github.com/repos/7lb/step_tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/7lb/step_tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/7lb/step_tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/7lb/step_tracker/labels{/name}","releases_url":"https://api.github.com/repos/7lb/step_tracker/releases{/id}","created_at":"2015-11-24T17:06:49Z","updated_at":"2015-11-24T17:07:21Z","pushed_at":"2015-11-27T09:46:40Z","git_url":"git://github.com/7lb/step_tracker.git","ssh_url":"git@github.com:7lb/step_tracker.git","clone_url":"https://github.com/7lb/step_tracker.git","svn_url":"https://github.com/7lb/step_tracker","homepage":null,"size":24,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/7lb/step_tracker/pulls/4"},"html":{"href":"https://github.com/7lb/step_tracker/pull/4"},"issue":{"href":"https://api.github.com/repos/7lb/step_tracker/issues/4"},"comments":{"href":"https://api.github.com/repos/7lb/step_tracker/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/7lb/step_tracker/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/7lb/step_tracker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/7lb/step_tracker/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/7lb/step_tracker/statuses/8b4b2644b84edccd3bfbac2c5adceb404ac3f03b"}}}}