{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/kitsune/pulls/comments/37110197","id":37110197,"diff_hunk":"@@ -0,0 +1,28 @@\n+from kitsune.products.tests import product\n+from kitsune.search.tests.test_es import ElasticTestCase\n+from kitsune.sumo.tests import LocalizingClient\n+from kitsune.sumo.urlresolvers import reverse\n+from kitsune.wiki.tests import document, revision\n+\n+\n+class SearchApiTests(ElasticTestCase):\n+    client_class = LocalizingClient\n+\n+    def test_search_products(self):\n+        p = product(title=u'Product One', slug='product', save=True)\n+        doc1 = document(title=u'cookies', locale='en-US', category=10,\n+                        save=True)\n+        revision(document=doc1, is_approved=True, save=True)\n+        doc1.products.add(p)\n+        doc1.save()\n+\n+        self.refresh()\n+\n+        response = self.client.get(\n+            reverse('coolsearch.search_wiki'),\n+            {}\n+        )\n+\n+        assert \"We couldn't find any results for\" not in response.content\n+        # eq_(200, response.status_code)\n+        # assert 'Product One' in response.content","path":"kitsune/coolsearch/tests/test_api.py","position":28,"original_position":28,"commit_id":"a410108b477622ad9305f8077e1a25ce642e6f74","original_commit_id":"a410108b477622ad9305f8077e1a25ce642e6f74","user":{"login":"mythmon","id":305049,"avatar_url":"https://avatars.githubusercontent.com/u/305049?v=3","gravatar_id":"","url":"https://api.github.com/users/mythmon","html_url":"https://github.com/mythmon","followers_url":"https://api.github.com/users/mythmon/followers","following_url":"https://api.github.com/users/mythmon/following{/other_user}","gists_url":"https://api.github.com/users/mythmon/gists{/gist_id}","starred_url":"https://api.github.com/users/mythmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mythmon/subscriptions","organizations_url":"https://api.github.com/users/mythmon/orgs","repos_url":"https://api.github.com/users/mythmon/repos","events_url":"https://api.github.com/users/mythmon/events{/privacy}","received_events_url":"https://api.github.com/users/mythmon/received_events","type":"User","site_admin":false},"body":"These commented lines probably shouldn't be here. Or they should be uncommented.","created_at":"2015-08-14T19:21:53Z","updated_at":"2015-08-14T19:21:53Z","html_url":"https://github.com/mozilla/kitsune/pull/2620#discussion_r37110197","pull_request_url":"https://api.github.com/repos/mozilla/kitsune/pulls/2620","_links":{"self":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/comments/37110197"},"html":{"href":"https://github.com/mozilla/kitsune/pull/2620#discussion_r37110197"},"pull_request":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/2620"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/kitsune/pulls/2620","id":42474310,"html_url":"https://github.com/mozilla/kitsune/pull/2620","diff_url":"https://github.com/mozilla/kitsune/pull/2620.diff","patch_url":"https://github.com/mozilla/kitsune/pull/2620.patch","issue_url":"https://api.github.com/repos/mozilla/kitsune/issues/2620","number":2620,"state":"open","locked":false,"title":"Introducing Cool Search.","user":{"login":"AdrianGaudebert","id":328790,"avatar_url":"https://avatars.githubusercontent.com/u/328790?v=3","gravatar_id":"","url":"https://api.github.com/users/AdrianGaudebert","html_url":"https://github.com/AdrianGaudebert","followers_url":"https://api.github.com/users/AdrianGaudebert/followers","following_url":"https://api.github.com/users/AdrianGaudebert/following{/other_user}","gists_url":"https://api.github.com/users/AdrianGaudebert/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrianGaudebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrianGaudebert/subscriptions","organizations_url":"https://api.github.com/users/AdrianGaudebert/orgs","repos_url":"https://api.github.com/users/AdrianGaudebert/repos","events_url":"https://api.github.com/users/AdrianGaudebert/events{/privacy}","received_events_url":"https://api.github.com/users/AdrianGaudebert/received_events","type":"User","site_admin":false},"body":"@mythmon I think most of this, at least the JS side, is ready for v0.1. It is still missing API unit tests, that I am going to work on next, and I'd like to get your input on what you think is needed next.\r\n\r\nCurrent features:\r\n- [x] simple query for each document type, tabulated form\r\n- [x] results are displayed under the form\r\n- [x] results are fetched automatically when user types\r\n\r\nNeeded features:\r\n- [ ] unit tests for API\r\n- [ ] advanced filters for each document type\r\n- [ ] styling of the tabs (I'll need to fork the tab library to adapt it to our needs)\r\n\r\nAlso, why do we have files in the ``/static`` folder if that one is in the .gitignore? I don't know how I ended up deleting that ``.htaccess`` file, but now I'm struggling to re-add it. ","created_at":"2015-08-14T16:40:04Z","updated_at":"2015-08-14T19:21:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1853ef7a68b6c3ea0ee789cf15798a59d7d18999","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/kitsune/pulls/2620/commits","review_comments_url":"https://api.github.com/repos/mozilla/kitsune/pulls/2620/comments","review_comment_url":"https://api.github.com/repos/mozilla/kitsune/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/kitsune/issues/2620/comments","statuses_url":"https://api.github.com/repos/mozilla/kitsune/statuses/a410108b477622ad9305f8077e1a25ce642e6f74","head":{"label":"AdrianGaudebert:coolsearch-init","ref":"coolsearch-init","sha":"a410108b477622ad9305f8077e1a25ce642e6f74","user":{"login":"AdrianGaudebert","id":328790,"avatar_url":"https://avatars.githubusercontent.com/u/328790?v=3","gravatar_id":"","url":"https://api.github.com/users/AdrianGaudebert","html_url":"https://github.com/AdrianGaudebert","followers_url":"https://api.github.com/users/AdrianGaudebert/followers","following_url":"https://api.github.com/users/AdrianGaudebert/following{/other_user}","gists_url":"https://api.github.com/users/AdrianGaudebert/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrianGaudebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrianGaudebert/subscriptions","organizations_url":"https://api.github.com/users/AdrianGaudebert/orgs","repos_url":"https://api.github.com/users/AdrianGaudebert/repos","events_url":"https://api.github.com/users/AdrianGaudebert/events{/privacy}","received_events_url":"https://api.github.com/users/AdrianGaudebert/received_events","type":"User","site_admin":false},"repo":{"id":33930145,"name":"kitsune","full_name":"AdrianGaudebert/kitsune","owner":{"login":"AdrianGaudebert","id":328790,"avatar_url":"https://avatars.githubusercontent.com/u/328790?v=3","gravatar_id":"","url":"https://api.github.com/users/AdrianGaudebert","html_url":"https://github.com/AdrianGaudebert","followers_url":"https://api.github.com/users/AdrianGaudebert/followers","following_url":"https://api.github.com/users/AdrianGaudebert/following{/other_user}","gists_url":"https://api.github.com/users/AdrianGaudebert/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrianGaudebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrianGaudebert/subscriptions","organizations_url":"https://api.github.com/users/AdrianGaudebert/orgs","repos_url":"https://api.github.com/users/AdrianGaudebert/repos","events_url":"https://api.github.com/users/AdrianGaudebert/events{/privacy}","received_events_url":"https://api.github.com/users/AdrianGaudebert/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AdrianGaudebert/kitsune","description":"Platform for Mozilla Support","fork":true,"url":"https://api.github.com/repos/AdrianGaudebert/kitsune","forks_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/forks","keys_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/teams","hooks_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/hooks","issue_events_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/issues/events{/number}","events_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/events","assignees_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/assignees{/user}","branches_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/branches{/branch}","tags_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/tags","blobs_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/git/refs{/sha}","trees_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/statuses/{sha}","languages_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/languages","stargazers_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/stargazers","contributors_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/contributors","subscribers_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/subscribers","subscription_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/subscription","commits_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/commits{/sha}","git_commits_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/git/commits{/sha}","comments_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/comments{/number}","issue_comment_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/issues/comments{/number}","contents_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/contents/{+path}","compare_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/merges","archive_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/downloads","issues_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/issues{/number}","pulls_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/pulls{/number}","milestones_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/milestones{/number}","notifications_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/labels{/name}","releases_url":"https://api.github.com/repos/AdrianGaudebert/kitsune/releases{/id}","created_at":"2015-04-14T12:25:18Z","updated_at":"2015-04-28T16:47:37Z","pushed_at":"2015-08-14T16:28:01Z","git_url":"git://github.com/AdrianGaudebert/kitsune.git","ssh_url":"git@github.com:AdrianGaudebert/kitsune.git","clone_url":"https://github.com/AdrianGaudebert/kitsune.git","svn_url":"https://github.com/AdrianGaudebert/kitsune","homepage":"http://support.mozilla.com/","size":113029,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"d71b3bee10df9e132abf4f9c5cb45af3509c6fa0","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":489645,"name":"kitsune","full_name":"mozilla/kitsune","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/kitsune","description":"Platform for Mozilla Support","fork":false,"url":"https://api.github.com/repos/mozilla/kitsune","forks_url":"https://api.github.com/repos/mozilla/kitsune/forks","keys_url":"https://api.github.com/repos/mozilla/kitsune/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/kitsune/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/kitsune/teams","hooks_url":"https://api.github.com/repos/mozilla/kitsune/hooks","issue_events_url":"https://api.github.com/repos/mozilla/kitsune/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/kitsune/events","assignees_url":"https://api.github.com/repos/mozilla/kitsune/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/kitsune/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/kitsune/tags","blobs_url":"https://api.github.com/repos/mozilla/kitsune/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/kitsune/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/kitsune/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/kitsune/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/kitsune/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/kitsune/languages","stargazers_url":"https://api.github.com/repos/mozilla/kitsune/stargazers","contributors_url":"https://api.github.com/repos/mozilla/kitsune/contributors","subscribers_url":"https://api.github.com/repos/mozilla/kitsune/subscribers","subscription_url":"https://api.github.com/repos/mozilla/kitsune/subscription","commits_url":"https://api.github.com/repos/mozilla/kitsune/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/kitsune/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/kitsune/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/kitsune/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/kitsune/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/kitsune/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/kitsune/merges","archive_url":"https://api.github.com/repos/mozilla/kitsune/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/kitsune/downloads","issues_url":"https://api.github.com/repos/mozilla/kitsune/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/kitsune/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/kitsune/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/kitsune/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/kitsune/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/kitsune/releases{/id}","created_at":"2010-01-26T18:53:57Z","updated_at":"2015-08-12T19:46:42Z","pushed_at":"2015-08-14T16:40:04Z","git_url":"git://github.com/mozilla/kitsune.git","ssh_url":"git@github.com:mozilla/kitsune.git","clone_url":"https://github.com/mozilla/kitsune.git","svn_url":"https://github.com/mozilla/kitsune","homepage":"http://support.mozilla.com/","size":178041,"stargazers_count":301,"watchers_count":301,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":296,"mirror_url":null,"open_issues_count":4,"forks":296,"open_issues":4,"watchers":301,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/2620"},"html":{"href":"https://github.com/mozilla/kitsune/pull/2620"},"issue":{"href":"https://api.github.com/repos/mozilla/kitsune/issues/2620"},"comments":{"href":"https://api.github.com/repos/mozilla/kitsune/issues/2620/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/2620/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/kitsune/pulls/2620/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/kitsune/statuses/a410108b477622ad9305f8077e1a25ce642e6f74"}}}}