{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-notes-api/pulls/comments/22443090","id":22443090,"diff_hunk":"@@ -126,6 +139,29 @@ def test_create_note(self, mock_datetime):\n \n         self.assertEqual(response.data['user'], TEST_USER)\n \n+    @patch('django.conf.settings.ES_DISABLED', True)\n+    def test_create_es_disabled(self):\n+        \"\"\"\n+        Ensure we can create note in database when elasticsearch is disabled.\n+        \"\"\"\n+        url = reverse('api:v1:annotations')\n+        response = self.client.post(url, self.payload, format='json')\n+        self.assertEqual(response.status_code, status.HTTP_201_CREATED)\n+        Note.objects.get(id=response.data['id'])\n+        self.assertEqual(note_searcher.filter(id=response.data['id']).count(), 0)\n+\n+    def test_delete_es_disabled(self):\n+        \"\"\"\n+        Ensure we can create note in database when elasticsearch is disabled.","path":"notesapi/v1/tests/test_views.py","position":183,"original_position":183,"commit_id":"977c5c35cc6513c5015e07c6d00a58e19f5f3fa7","original_commit_id":"977c5c35cc6513c5015e07c6d00a58e19f5f3fa7","user":{"login":"jimabramson","id":1349368,"avatar_url":"https://avatars.githubusercontent.com/u/1349368?v=3","gravatar_id":"","url":"https://api.github.com/users/jimabramson","html_url":"https://github.com/jimabramson","followers_url":"https://api.github.com/users/jimabramson/followers","following_url":"https://api.github.com/users/jimabramson/following{/other_user}","gists_url":"https://api.github.com/users/jimabramson/gists{/gist_id}","starred_url":"https://api.github.com/users/jimabramson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimabramson/subscriptions","organizations_url":"https://api.github.com/users/jimabramson/orgs","repos_url":"https://api.github.com/users/jimabramson/repos","events_url":"https://api.github.com/users/jimabramson/events{/privacy}","received_events_url":"https://api.github.com/users/jimabramson/received_events","type":"User","site_admin":false},"body":"s/create/delete/","created_at":"2015-01-04T22:02:01Z","updated_at":"2015-01-04T22:02:01Z","html_url":"https://github.com/edx/edx-notes-api/pull/9#discussion_r22443090","pull_request_url":"https://api.github.com/repos/edx/edx-notes-api/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-notes-api/pulls/comments/22443090"},"html":{"href":"https://github.com/edx/edx-notes-api/pull/9#discussion_r22443090"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-notes-api/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-notes-api/pulls/9","id":26582683,"html_url":"https://github.com/edx/edx-notes-api/pull/9","diff_url":"https://github.com/edx/edx-notes-api/pull/9.diff","patch_url":"https://github.com/edx/edx-notes-api/pull/9.patch","issue_url":"https://api.github.com/repos/edx/edx-notes-api/issues/9","number":9,"state":"open","locked":false,"title":"Switch off of Elasticsearch as main storage.","user":{"login":"polesye","id":1247491,"avatar_url":"https://avatars.githubusercontent.com/u/1247491?v=3","gravatar_id":"","url":"https://api.github.com/users/polesye","html_url":"https://github.com/polesye","followers_url":"https://api.github.com/users/polesye/followers","following_url":"https://api.github.com/users/polesye/following{/other_user}","gists_url":"https://api.github.com/users/polesye/gists{/gist_id}","starred_url":"https://api.github.com/users/polesye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polesye/subscriptions","organizations_url":"https://api.github.com/users/polesye/orgs","repos_url":"https://api.github.com/users/polesye/repos","events_url":"https://api.github.com/users/polesye/events{/privacy}","received_events_url":"https://api.github.com/users/polesye/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-12-25T13:51:08Z","updated_at":"2015-01-04T22:02:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a9cdf96a89f6783bdb00817f1c676d00c54b179c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-notes-api/pulls/9/commits","review_comments_url":"https://api.github.com/repos/edx/edx-notes-api/pulls/9/comments","review_comment_url":"https://api.github.com/repos/edx/edx-notes-api/pulls/comments/{number}","comments_url":"https://api.github.com/repos/edx/edx-notes-api/issues/9/comments","statuses_url":"https://api.github.com/repos/edx/edx-notes-api/statuses/977c5c35cc6513c5015e07c6d00a58e19f5f3fa7","head":{"label":"edx:oleg/models","ref":"oleg/models","sha":"977c5c35cc6513c5015e07c6d00a58e19f5f3fa7","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":26452208,"name":"edx-notes-api","full_name":"edx/edx-notes-api","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-notes-api","description":"edx-notes-api","fork":false,"url":"https://api.github.com/repos/edx/edx-notes-api","forks_url":"https://api.github.com/repos/edx/edx-notes-api/forks","keys_url":"https://api.github.com/repos/edx/edx-notes-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-notes-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-notes-api/teams","hooks_url":"https://api.github.com/repos/edx/edx-notes-api/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-notes-api/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-notes-api/events","assignees_url":"https://api.github.com/repos/edx/edx-notes-api/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-notes-api/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-notes-api/tags","blobs_url":"https://api.github.com/repos/edx/edx-notes-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-notes-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-notes-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-notes-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-notes-api/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-notes-api/languages","stargazers_url":"https://api.github.com/repos/edx/edx-notes-api/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-notes-api/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-notes-api/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-notes-api/subscription","commits_url":"https://api.github.com/repos/edx/edx-notes-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-notes-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-notes-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-notes-api/issues/comments/{number}","contents_url":"https://api.github.com/repos/edx/edx-notes-api/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-notes-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-notes-api/merges","archive_url":"https://api.github.com/repos/edx/edx-notes-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-notes-api/downloads","issues_url":"https://api.github.com/repos/edx/edx-notes-api/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-notes-api/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-notes-api/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-notes-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-notes-api/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-notes-api/releases{/id}","created_at":"2014-11-10T19:37:29Z","updated_at":"2014-12-29T16:25:21Z","pushed_at":"2015-01-02T15:38:24Z","git_url":"git://github.com/edx/edx-notes-api.git","ssh_url":"git@github.com:edx/edx-notes-api.git","clone_url":"https://github.com/edx/edx-notes-api.git","svn_url":"https://github.com/edx/edx-notes-api","homepage":null,"size":1171,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"d9cda8ef974145cba9609c4f9a3e6bacb67b4d97","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":26452208,"name":"edx-notes-api","full_name":"edx/edx-notes-api","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-notes-api","description":"edx-notes-api","fork":false,"url":"https://api.github.com/repos/edx/edx-notes-api","forks_url":"https://api.github.com/repos/edx/edx-notes-api/forks","keys_url":"https://api.github.com/repos/edx/edx-notes-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-notes-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-notes-api/teams","hooks_url":"https://api.github.com/repos/edx/edx-notes-api/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-notes-api/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-notes-api/events","assignees_url":"https://api.github.com/repos/edx/edx-notes-api/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-notes-api/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-notes-api/tags","blobs_url":"https://api.github.com/repos/edx/edx-notes-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-notes-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-notes-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-notes-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-notes-api/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-notes-api/languages","stargazers_url":"https://api.github.com/repos/edx/edx-notes-api/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-notes-api/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-notes-api/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-notes-api/subscription","commits_url":"https://api.github.com/repos/edx/edx-notes-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-notes-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-notes-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-notes-api/issues/comments/{number}","contents_url":"https://api.github.com/repos/edx/edx-notes-api/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-notes-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-notes-api/merges","archive_url":"https://api.github.com/repos/edx/edx-notes-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-notes-api/downloads","issues_url":"https://api.github.com/repos/edx/edx-notes-api/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-notes-api/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-notes-api/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-notes-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-notes-api/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-notes-api/releases{/id}","created_at":"2014-11-10T19:37:29Z","updated_at":"2014-12-29T16:25:21Z","pushed_at":"2015-01-02T15:38:24Z","git_url":"git://github.com/edx/edx-notes-api.git","ssh_url":"git@github.com:edx/edx-notes-api.git","clone_url":"https://github.com/edx/edx-notes-api.git","svn_url":"https://github.com/edx/edx-notes-api","homepage":null,"size":1171,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-notes-api/pulls/9"},"html":{"href":"https://github.com/edx/edx-notes-api/pull/9"},"issue":{"href":"https://api.github.com/repos/edx/edx-notes-api/issues/9"},"comments":{"href":"https://api.github.com/repos/edx/edx-notes-api/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-notes-api/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-notes-api/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-notes-api/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-notes-api/statuses/977c5c35cc6513c5015e07c6d00a58e19f5f3fa7"}}}}