{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/mozdownload/pulls/comments/29837245","id":29837245,"diff_hunk":"@@ -0,0 +1,70 @@\n+#!/usr/bin/env python\n+\n+# This Source Code Form is subject to the terms of the Mozilla Public\n+# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n+# You can obtain one at http://mozilla.org/MPL/2.0/.\n+\n+import os\n+import unittest\n+import urllib\n+\n+import mozfile\n+import mozhttpd_base_test as mhttpd\n+from mozprocess import processhandler\n+\n+\n+class CorrectScraperTest(mhttpd.MozHttpdBaseTest):\n+    \"\"\"Test mozdownload for correct choice of scraper\"\"\"\n+\n+    def test_scraper(self):\n+        \"\"\"Testing various download scenarios for DailyScraper\"\"\"\n+\n+        # This works\n+        # Now choose four distinctly named packages\n+        # Download them and check if correct file name\n+        # Then delete again for each cycle\n+\n+        # Once whole test is written, fix manifest.ini's again.\n+\n+        tests = [\n+            # ReleaseScraper\n+            {'command': ['./mozdownload/scraper.py', '-v', 'latest',\n+                         '--base_url=%s' % self.wdir,\n+                         '--destination=%s' % self.temp_dir],","path":"tests/base_scraper/test_correct_scraper.py","position":33,"original_position":33,"commit_id":"8bfd82e2362b5127b9620202fc568dce1b1a1d68","original_commit_id":"8bfd82e2362b5127b9620202fc568dce1b1a1d68","user":{"login":"whimboo","id":129603,"avatar_url":"https://avatars.githubusercontent.com/u/129603?v=3","gravatar_id":"","url":"https://api.github.com/users/whimboo","html_url":"https://github.com/whimboo","followers_url":"https://api.github.com/users/whimboo/followers","following_url":"https://api.github.com/users/whimboo/following{/other_user}","gists_url":"https://api.github.com/users/whimboo/gists{/gist_id}","starred_url":"https://api.github.com/users/whimboo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whimboo/subscriptions","organizations_url":"https://api.github.com/users/whimboo/orgs","repos_url":"https://api.github.com/users/whimboo/repos","events_url":"https://api.github.com/users/whimboo/events{/privacy}","received_events_url":"https://api.github.com/users/whimboo/received_events","type":"User","site_admin":false},"body":"The command, base url, and destination is always the same. I would hardcode it in the test, and extend the arguments as necessary.","created_at":"2015-05-07T09:36:18Z","updated_at":"2015-05-07T09:36:18Z","html_url":"https://github.com/mozilla/mozdownload/pull/270#discussion_r29837245","pull_request_url":"https://api.github.com/repos/mozilla/mozdownload/pulls/270","_links":{"self":{"href":"https://api.github.com/repos/mozilla/mozdownload/pulls/comments/29837245"},"html":{"href":"https://github.com/mozilla/mozdownload/pull/270#discussion_r29837245"},"pull_request":{"href":"https://api.github.com/repos/mozilla/mozdownload/pulls/270"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/mozdownload/pulls/270","id":31065992,"html_url":"https://github.com/mozilla/mozdownload/pull/270","diff_url":"https://github.com/mozilla/mozdownload/pull/270.diff","patch_url":"https://github.com/mozilla/mozdownload/pull/270.patch","issue_url":"https://api.github.com/repos/mozilla/mozdownload/issues/270","number":270,"state":"open","locked":false,"title":"Test for correct choice of scraper (#257)","user":{"login":"Nebelhom","id":2185557,"avatar_url":"https://avatars.githubusercontent.com/u/2185557?v=3","gravatar_id":"","url":"https://api.github.com/users/Nebelhom","html_url":"https://github.com/Nebelhom","followers_url":"https://api.github.com/users/Nebelhom/followers","following_url":"https://api.github.com/users/Nebelhom/following{/other_user}","gists_url":"https://api.github.com/users/Nebelhom/gists{/gist_id}","starred_url":"https://api.github.com/users/Nebelhom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nebelhom/subscriptions","organizations_url":"https://api.github.com/users/Nebelhom/orgs","repos_url":"https://api.github.com/users/Nebelhom/repos","events_url":"https://api.github.com/users/Nebelhom/events{/privacy}","received_events_url":"https://api.github.com/users/Nebelhom/received_events","type":"User","site_admin":false},"body":"This PR addresses issue #257 \r\n\r\nIn order to make this test work, I added the `--base_url` flag, which allows you to choose the base_url of your server. I could not think of another way of calling scraper and using mozhttp.\r\n\r\n","created_at":"2015-03-12T18:48:05Z","updated_at":"2015-05-07T09:36:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f9c8f7373755a74bd82a49611b205fead54f45b","assignee":{"login":"Nebelhom","id":2185557,"avatar_url":"https://avatars.githubusercontent.com/u/2185557?v=3","gravatar_id":"","url":"https://api.github.com/users/Nebelhom","html_url":"https://github.com/Nebelhom","followers_url":"https://api.github.com/users/Nebelhom/followers","following_url":"https://api.github.com/users/Nebelhom/following{/other_user}","gists_url":"https://api.github.com/users/Nebelhom/gists{/gist_id}","starred_url":"https://api.github.com/users/Nebelhom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nebelhom/subscriptions","organizations_url":"https://api.github.com/users/Nebelhom/orgs","repos_url":"https://api.github.com/users/Nebelhom/repos","events_url":"https://api.github.com/users/Nebelhom/events{/privacy}","received_events_url":"https://api.github.com/users/Nebelhom/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/mozdownload/pulls/270/commits","review_comments_url":"https://api.github.com/repos/mozilla/mozdownload/pulls/270/comments","review_comment_url":"https://api.github.com/repos/mozilla/mozdownload/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/mozdownload/issues/270/comments","statuses_url":"https://api.github.com/repos/mozilla/mozdownload/statuses/8bfd82e2362b5127b9620202fc568dce1b1a1d68","head":{"label":"Nebelhom:issue_257_correct_scraper","ref":"issue_257_correct_scraper","sha":"8bfd82e2362b5127b9620202fc568dce1b1a1d68","user":{"login":"Nebelhom","id":2185557,"avatar_url":"https://avatars.githubusercontent.com/u/2185557?v=3","gravatar_id":"","url":"https://api.github.com/users/Nebelhom","html_url":"https://github.com/Nebelhom","followers_url":"https://api.github.com/users/Nebelhom/followers","following_url":"https://api.github.com/users/Nebelhom/following{/other_user}","gists_url":"https://api.github.com/users/Nebelhom/gists{/gist_id}","starred_url":"https://api.github.com/users/Nebelhom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nebelhom/subscriptions","organizations_url":"https://api.github.com/users/Nebelhom/orgs","repos_url":"https://api.github.com/users/Nebelhom/repos","events_url":"https://api.github.com/users/Nebelhom/events{/privacy}","received_events_url":"https://api.github.com/users/Nebelhom/received_events","type":"User","site_admin":false},"repo":{"id":8357071,"name":"mozdownload","full_name":"Nebelhom/mozdownload","owner":{"login":"Nebelhom","id":2185557,"avatar_url":"https://avatars.githubusercontent.com/u/2185557?v=3","gravatar_id":"","url":"https://api.github.com/users/Nebelhom","html_url":"https://github.com/Nebelhom","followers_url":"https://api.github.com/users/Nebelhom/followers","following_url":"https://api.github.com/users/Nebelhom/following{/other_user}","gists_url":"https://api.github.com/users/Nebelhom/gists{/gist_id}","starred_url":"https://api.github.com/users/Nebelhom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nebelhom/subscriptions","organizations_url":"https://api.github.com/users/Nebelhom/orgs","repos_url":"https://api.github.com/users/Nebelhom/repos","events_url":"https://api.github.com/users/Nebelhom/events{/privacy}","received_events_url":"https://api.github.com/users/Nebelhom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nebelhom/mozdownload","description":"Easy to use download tool and API for different types of Firefox and Thunderbird builds","fork":true,"url":"https://api.github.com/repos/Nebelhom/mozdownload","forks_url":"https://api.github.com/repos/Nebelhom/mozdownload/forks","keys_url":"https://api.github.com/repos/Nebelhom/mozdownload/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nebelhom/mozdownload/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nebelhom/mozdownload/teams","hooks_url":"https://api.github.com/repos/Nebelhom/mozdownload/hooks","issue_events_url":"https://api.github.com/repos/Nebelhom/mozdownload/issues/events{/number}","events_url":"https://api.github.com/repos/Nebelhom/mozdownload/events","assignees_url":"https://api.github.com/repos/Nebelhom/mozdownload/assignees{/user}","branches_url":"https://api.github.com/repos/Nebelhom/mozdownload/branches{/branch}","tags_url":"https://api.github.com/repos/Nebelhom/mozdownload/tags","blobs_url":"https://api.github.com/repos/Nebelhom/mozdownload/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nebelhom/mozdownload/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nebelhom/mozdownload/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nebelhom/mozdownload/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nebelhom/mozdownload/statuses/{sha}","languages_url":"https://api.github.com/repos/Nebelhom/mozdownload/languages","stargazers_url":"https://api.github.com/repos/Nebelhom/mozdownload/stargazers","contributors_url":"https://api.github.com/repos/Nebelhom/mozdownload/contributors","subscribers_url":"https://api.github.com/repos/Nebelhom/mozdownload/subscribers","subscription_url":"https://api.github.com/repos/Nebelhom/mozdownload/subscription","commits_url":"https://api.github.com/repos/Nebelhom/mozdownload/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nebelhom/mozdownload/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nebelhom/mozdownload/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nebelhom/mozdownload/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nebelhom/mozdownload/contents/{+path}","compare_url":"https://api.github.com/repos/Nebelhom/mozdownload/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nebelhom/mozdownload/merges","archive_url":"https://api.github.com/repos/Nebelhom/mozdownload/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nebelhom/mozdownload/downloads","issues_url":"https://api.github.com/repos/Nebelhom/mozdownload/issues{/number}","pulls_url":"https://api.github.com/repos/Nebelhom/mozdownload/pulls{/number}","milestones_url":"https://api.github.com/repos/Nebelhom/mozdownload/milestones{/number}","notifications_url":"https://api.github.com/repos/Nebelhom/mozdownload/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nebelhom/mozdownload/labels{/name}","releases_url":"https://api.github.com/repos/Nebelhom/mozdownload/releases{/id}","created_at":"2013-02-22T12:42:47Z","updated_at":"2015-03-06T16:23:14Z","pushed_at":"2015-03-12T18:45:37Z","git_url":"git://github.com/Nebelhom/mozdownload.git","ssh_url":"git@github.com:Nebelhom/mozdownload.git","clone_url":"https://github.com/Nebelhom/mozdownload.git","svn_url":"https://github.com/Nebelhom/mozdownload","homepage":"http://pypi.python.org/pypi/mozdownload","size":991,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"028ae444426b6e7691138e88ac306c6f8e6dfd74","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":4421513,"name":"mozdownload","full_name":"mozilla/mozdownload","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/mozdownload","description":"Easy to use download tool and API for different types of Firefox and Thunderbird builds","fork":false,"url":"https://api.github.com/repos/mozilla/mozdownload","forks_url":"https://api.github.com/repos/mozilla/mozdownload/forks","keys_url":"https://api.github.com/repos/mozilla/mozdownload/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/mozdownload/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/mozdownload/teams","hooks_url":"https://api.github.com/repos/mozilla/mozdownload/hooks","issue_events_url":"https://api.github.com/repos/mozilla/mozdownload/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/mozdownload/events","assignees_url":"https://api.github.com/repos/mozilla/mozdownload/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/mozdownload/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/mozdownload/tags","blobs_url":"https://api.github.com/repos/mozilla/mozdownload/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/mozdownload/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/mozdownload/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/mozdownload/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/mozdownload/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/mozdownload/languages","stargazers_url":"https://api.github.com/repos/mozilla/mozdownload/stargazers","contributors_url":"https://api.github.com/repos/mozilla/mozdownload/contributors","subscribers_url":"https://api.github.com/repos/mozilla/mozdownload/subscribers","subscription_url":"https://api.github.com/repos/mozilla/mozdownload/subscription","commits_url":"https://api.github.com/repos/mozilla/mozdownload/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/mozdownload/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/mozdownload/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/mozdownload/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/mozdownload/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/mozdownload/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/mozdownload/merges","archive_url":"https://api.github.com/repos/mozilla/mozdownload/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/mozdownload/downloads","issues_url":"https://api.github.com/repos/mozilla/mozdownload/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/mozdownload/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/mozdownload/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/mozdownload/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/mozdownload/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/mozdownload/releases{/id}","created_at":"2012-05-23T15:06:09Z","updated_at":"2015-03-29T22:57:28Z","pushed_at":"2015-05-02T04:44:13Z","git_url":"git://github.com/mozilla/mozdownload.git","ssh_url":"git@github.com:mozilla/mozdownload.git","clone_url":"https://github.com/mozilla/mozdownload.git","svn_url":"https://github.com/mozilla/mozdownload","homepage":"http://pypi.python.org/pypi/mozdownload","size":28245,"stargazers_count":24,"watchers_count":24,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":48,"forks":26,"open_issues":48,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/mozdownload/pulls/270"},"html":{"href":"https://github.com/mozilla/mozdownload/pull/270"},"issue":{"href":"https://api.github.com/repos/mozilla/mozdownload/issues/270"},"comments":{"href":"https://api.github.com/repos/mozilla/mozdownload/issues/270/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/mozdownload/pulls/270/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/mozdownload/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/mozdownload/pulls/270/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/mozdownload/statuses/8bfd82e2362b5127b9620202fc568dce1b1a1d68"}}}}