{"action":"created","comment":{"url":"https://api.github.com/repos/mitodl/lore/pulls/comments/37304833","id":37304833,"diff_hunk":"@@ -245,3 +262,39 @@ def test_term_cache_without_data(self):\n         a LearningResource isn't tagged with any terms.\n         \"\"\"\n         self.thrice()\n+\n+    def test_vocab_cache_by_course(self):\n+        \"\"\"\n+        Ensure that get_vocabs for one course doesn't\n+        pollute the cache for another course.\n+        \"\"\"\n+        # Create a resource in a separate course.\n+        # pylint: disable=protected-access\n+        self.course, course2 = copy_instance(self.course)\n+        self.resource, resource2 = copy_instance(self.resource)\n+        course2.run = self.course.run + \" part 2\"","path":"search/tests/test_indexing.py","position":38,"original_position":38,"commit_id":"cae7c8309f495391038ff1e197930e0753e0db4c","original_commit_id":"cae7c8309f495391038ff1e197930e0753e0db4c","user":{"login":"giocalitri","id":1005204,"avatar_url":"https://avatars.githubusercontent.com/u/1005204?v=3","gravatar_id":"","url":"https://api.github.com/users/giocalitri","html_url":"https://github.com/giocalitri","followers_url":"https://api.github.com/users/giocalitri/followers","following_url":"https://api.github.com/users/giocalitri/following{/other_user}","gists_url":"https://api.github.com/users/giocalitri/gists{/gist_id}","starred_url":"https://api.github.com/users/giocalitri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giocalitri/subscriptions","organizations_url":"https://api.github.com/users/giocalitri/orgs","repos_url":"https://api.github.com/users/giocalitri/repos","events_url":"https://api.github.com/users/giocalitri/events{/privacy}","received_events_url":"https://api.github.com/users/giocalitri/received_events","type":"User","site_admin":false},"body":"I like more `\"{} part 2\".format(self.course.run)`, but feel free to leave it as it is","created_at":"2015-08-18T14:32:11Z","updated_at":"2015-08-18T14:32:11Z","html_url":"https://github.com/mitodl/lore/pull/533#discussion_r37304833","pull_request_url":"https://api.github.com/repos/mitodl/lore/pulls/533","_links":{"self":{"href":"https://api.github.com/repos/mitodl/lore/pulls/comments/37304833"},"html":{"href":"https://github.com/mitodl/lore/pull/533#discussion_r37304833"},"pull_request":{"href":"https://api.github.com/repos/mitodl/lore/pulls/533"}}},"pull_request":{"url":"https://api.github.com/repos/mitodl/lore/pulls/533","id":42645640,"html_url":"https://github.com/mitodl/lore/pull/533","diff_url":"https://github.com/mitodl/lore/pull/533.diff","patch_url":"https://github.com/mitodl/lore/pull/533.patch","issue_url":"https://api.github.com/repos/mitodl/lore/issues/533","number":533,"state":"open","locked":false,"title":"Fixed caching bug.","user":{"login":"ShawnMilo","id":130120,"avatar_url":"https://avatars.githubusercontent.com/u/130120?v=3","gravatar_id":"","url":"https://api.github.com/users/ShawnMilo","html_url":"https://github.com/ShawnMilo","followers_url":"https://api.github.com/users/ShawnMilo/followers","following_url":"https://api.github.com/users/ShawnMilo/following{/other_user}","gists_url":"https://api.github.com/users/ShawnMilo/gists{/gist_id}","starred_url":"https://api.github.com/users/ShawnMilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShawnMilo/subscriptions","organizations_url":"https://api.github.com/users/ShawnMilo/orgs","repos_url":"https://api.github.com/users/ShawnMilo/repos","events_url":"https://api.github.com/users/ShawnMilo/events{/privacy}","received_events_url":"https://api.github.com/users/ShawnMilo/received_events","type":"User","site_admin":false},"body":"Fixes #529.\r\n\r\nThe caching done in `get_vocabs` was initializing the cached value\r\nfor all LearningResources, not just those in the course being dealt with.","created_at":"2015-08-17T23:20:11Z","updated_at":"2015-08-18T14:32:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d442fda9da1fefc5954efcad7fd78c8e5f4efc72","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mitodl/lore/pulls/533/commits","review_comments_url":"https://api.github.com/repos/mitodl/lore/pulls/533/comments","review_comment_url":"https://api.github.com/repos/mitodl/lore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mitodl/lore/issues/533/comments","statuses_url":"https://api.github.com/repos/mitodl/lore/statuses/cae7c8309f495391038ff1e197930e0753e0db4c","head":{"label":"mitodl:bug/skm/529_vocab_cache","ref":"bug/skm/529_vocab_cache","sha":"cae7c8309f495391038ff1e197930e0753e0db4c","user":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"repo":{"id":34909549,"name":"lore","full_name":"mitodl/lore","owner":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitodl/lore","description":"Learning Object Repository for Education","fork":false,"url":"https://api.github.com/repos/mitodl/lore","forks_url":"https://api.github.com/repos/mitodl/lore/forks","keys_url":"https://api.github.com/repos/mitodl/lore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitodl/lore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitodl/lore/teams","hooks_url":"https://api.github.com/repos/mitodl/lore/hooks","issue_events_url":"https://api.github.com/repos/mitodl/lore/issues/events{/number}","events_url":"https://api.github.com/repos/mitodl/lore/events","assignees_url":"https://api.github.com/repos/mitodl/lore/assignees{/user}","branches_url":"https://api.github.com/repos/mitodl/lore/branches{/branch}","tags_url":"https://api.github.com/repos/mitodl/lore/tags","blobs_url":"https://api.github.com/repos/mitodl/lore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitodl/lore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitodl/lore/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitodl/lore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitodl/lore/statuses/{sha}","languages_url":"https://api.github.com/repos/mitodl/lore/languages","stargazers_url":"https://api.github.com/repos/mitodl/lore/stargazers","contributors_url":"https://api.github.com/repos/mitodl/lore/contributors","subscribers_url":"https://api.github.com/repos/mitodl/lore/subscribers","subscription_url":"https://api.github.com/repos/mitodl/lore/subscription","commits_url":"https://api.github.com/repos/mitodl/lore/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitodl/lore/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitodl/lore/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitodl/lore/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitodl/lore/contents/{+path}","compare_url":"https://api.github.com/repos/mitodl/lore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitodl/lore/merges","archive_url":"https://api.github.com/repos/mitodl/lore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitodl/lore/downloads","issues_url":"https://api.github.com/repos/mitodl/lore/issues{/number}","pulls_url":"https://api.github.com/repos/mitodl/lore/pulls{/number}","milestones_url":"https://api.github.com/repos/mitodl/lore/milestones{/number}","notifications_url":"https://api.github.com/repos/mitodl/lore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitodl/lore/labels{/name}","releases_url":"https://api.github.com/repos/mitodl/lore/releases{/id}","created_at":"2015-05-01T15:34:34Z","updated_at":"2015-08-11T17:06:05Z","pushed_at":"2015-08-18T14:15:37Z","git_url":"git://github.com/mitodl/lore.git","ssh_url":"git@github.com:mitodl/lore.git","clone_url":"https://github.com/mitodl/lore.git","svn_url":"https://github.com/mitodl/lore","homepage":"https://goo.gl/nDVx4D","size":9656,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":113,"forks":3,"open_issues":113,"watchers":7,"default_branch":"master"}},"base":{"label":"mitodl:master","ref":"master","sha":"d3db19189a3e1a036fa2b25a702f3baadff8c569","user":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"repo":{"id":34909549,"name":"lore","full_name":"mitodl/lore","owner":{"login":"mitodl","id":7918516,"avatar_url":"https://avatars.githubusercontent.com/u/7918516?v=3","gravatar_id":"","url":"https://api.github.com/users/mitodl","html_url":"https://github.com/mitodl","followers_url":"https://api.github.com/users/mitodl/followers","following_url":"https://api.github.com/users/mitodl/following{/other_user}","gists_url":"https://api.github.com/users/mitodl/gists{/gist_id}","starred_url":"https://api.github.com/users/mitodl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitodl/subscriptions","organizations_url":"https://api.github.com/users/mitodl/orgs","repos_url":"https://api.github.com/users/mitodl/repos","events_url":"https://api.github.com/users/mitodl/events{/privacy}","received_events_url":"https://api.github.com/users/mitodl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitodl/lore","description":"Learning Object Repository for Education","fork":false,"url":"https://api.github.com/repos/mitodl/lore","forks_url":"https://api.github.com/repos/mitodl/lore/forks","keys_url":"https://api.github.com/repos/mitodl/lore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitodl/lore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitodl/lore/teams","hooks_url":"https://api.github.com/repos/mitodl/lore/hooks","issue_events_url":"https://api.github.com/repos/mitodl/lore/issues/events{/number}","events_url":"https://api.github.com/repos/mitodl/lore/events","assignees_url":"https://api.github.com/repos/mitodl/lore/assignees{/user}","branches_url":"https://api.github.com/repos/mitodl/lore/branches{/branch}","tags_url":"https://api.github.com/repos/mitodl/lore/tags","blobs_url":"https://api.github.com/repos/mitodl/lore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitodl/lore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitodl/lore/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitodl/lore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitodl/lore/statuses/{sha}","languages_url":"https://api.github.com/repos/mitodl/lore/languages","stargazers_url":"https://api.github.com/repos/mitodl/lore/stargazers","contributors_url":"https://api.github.com/repos/mitodl/lore/contributors","subscribers_url":"https://api.github.com/repos/mitodl/lore/subscribers","subscription_url":"https://api.github.com/repos/mitodl/lore/subscription","commits_url":"https://api.github.com/repos/mitodl/lore/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitodl/lore/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitodl/lore/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitodl/lore/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitodl/lore/contents/{+path}","compare_url":"https://api.github.com/repos/mitodl/lore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitodl/lore/merges","archive_url":"https://api.github.com/repos/mitodl/lore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitodl/lore/downloads","issues_url":"https://api.github.com/repos/mitodl/lore/issues{/number}","pulls_url":"https://api.github.com/repos/mitodl/lore/pulls{/number}","milestones_url":"https://api.github.com/repos/mitodl/lore/milestones{/number}","notifications_url":"https://api.github.com/repos/mitodl/lore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitodl/lore/labels{/name}","releases_url":"https://api.github.com/repos/mitodl/lore/releases{/id}","created_at":"2015-05-01T15:34:34Z","updated_at":"2015-08-11T17:06:05Z","pushed_at":"2015-08-18T14:15:37Z","git_url":"git://github.com/mitodl/lore.git","ssh_url":"git@github.com:mitodl/lore.git","clone_url":"https://github.com/mitodl/lore.git","svn_url":"https://github.com/mitodl/lore","homepage":"https://goo.gl/nDVx4D","size":9656,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":113,"forks":3,"open_issues":113,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitodl/lore/pulls/533"},"html":{"href":"https://github.com/mitodl/lore/pull/533"},"issue":{"href":"https://api.github.com/repos/mitodl/lore/issues/533"},"comments":{"href":"https://api.github.com/repos/mitodl/lore/issues/533/comments"},"review_comments":{"href":"https://api.github.com/repos/mitodl/lore/pulls/533/comments"},"review_comment":{"href":"https://api.github.com/repos/mitodl/lore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mitodl/lore/pulls/533/commits"},"statuses":{"href":"https://api.github.com/repos/mitodl/lore/statuses/cae7c8309f495391038ff1e197930e0753e0db4c"}}}}