{"action":"created","comment":{"url":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls/comments/185826197","pull_request_review_id":117294234,"id":185826197,"diff_hunk":"@@ -4,22 +4,66 @@\n from django.conf import settings\n from django.test import SimpleTestCase\n \n-from .utils import SymlinkedFileSystemStorage\n+import mock\n+\n+from .utils import S3MediaStorage, SymlinkedFileSystemStorage\n+\n+\n+class S3MediaStorageTest(SimpleTestCase):\n+\n+    def setUp(self):\n+        self.storage = S3MediaStorage(bucket_name='test-bucket')\n+\n+    @mock.patch('file_store.utils.S3MediaStorage.exists')\n+    def test_file_name_format(self, mock_exists):\n+        mock_exists.return_value = False\n+        name = self.storage.get_available_name('test.fastq')\n+        self.assertRegexpMatches(name, '[\\w]{7}/test\\.fastq')","path":"refinery/file_store/test_utils.py","position":19,"original_position":19,"commit_id":"7aabd05b22272006386203e43f248f73fcde4f42","original_commit_id":"7aabd05b22272006386203e43f248f73fcde4f42","user":{"login":"hackdna","id":452575,"avatar_url":"https://avatars0.githubusercontent.com/u/452575?v=4","gravatar_id":"","url":"https://api.github.com/users/hackdna","html_url":"https://github.com/hackdna","followers_url":"https://api.github.com/users/hackdna/followers","following_url":"https://api.github.com/users/hackdna/following{/other_user}","gists_url":"https://api.github.com/users/hackdna/gists{/gist_id}","starred_url":"https://api.github.com/users/hackdna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackdna/subscriptions","organizations_url":"https://api.github.com/users/hackdna/orgs","repos_url":"https://api.github.com/users/hackdna/repos","events_url":"https://api.github.com/users/hackdna/events{/privacy}","received_events_url":"https://api.github.com/users/hackdna/received_events","type":"User","site_admin":false},"body":"That 7 corresponds to the one in [S3MediaStorage.get_available_name()](https://github.com/refinery-platform/refinery-platform/pull/2737/files#diff-e861c3dd97417068aa544e06b9ba89fdR22) which is what's being tested here.\r\n\r\nForward slash is not a special character: https://docs.python.org/2/library/re.html#regular-expression-syntax\r\n","created_at":"2018-05-03T14:51:13Z","updated_at":"2018-05-03T14:51:13Z","html_url":"https://github.com/refinery-platform/refinery-platform/pull/2737#discussion_r185826197","pull_request_url":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls/2737","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls/comments/185826197"},"html":{"href":"https://github.com/refinery-platform/refinery-platform/pull/2737#discussion_r185826197"},"pull_request":{"href":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls/2737"}},"in_reply_to_id":185635161},"pull_request":{"url":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls/2737","id":185481098,"html_url":"https://github.com/refinery-platform/refinery-platform/pull/2737","diff_url":"https://github.com/refinery-platform/refinery-platform/pull/2737.diff","patch_url":"https://github.com/refinery-platform/refinery-platform/pull/2737.patch","issue_url":"https://api.github.com/repos/refinery-platform/refinery-platform/issues/2737","number":2737,"state":"open","locked":false,"title":"Add basic functionality for creating S3 user data object keys","user":{"login":"hackdna","id":452575,"avatar_url":"https://avatars0.githubusercontent.com/u/452575?v=4","gravatar_id":"","url":"https://api.github.com/users/hackdna","html_url":"https://github.com/hackdna","followers_url":"https://api.github.com/users/hackdna/followers","following_url":"https://api.github.com/users/hackdna/following{/other_user}","gists_url":"https://api.github.com/users/hackdna/gists{/gist_id}","starred_url":"https://api.github.com/users/hackdna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackdna/subscriptions","organizations_url":"https://api.github.com/users/hackdna/orgs","repos_url":"https://api.github.com/users/hackdna/repos","events_url":"https://api.github.com/users/hackdna/events{/privacy}","received_events_url":"https://api.github.com/users/hackdna/received_events","type":"User","site_admin":false},"body":"\r\n","created_at":"2018-05-02T15:45:46Z","updated_at":"2018-05-03T14:51:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bf77683eec89e00c171978a0cc21d2d59254cb3","assignee":{"login":"hackdna","id":452575,"avatar_url":"https://avatars0.githubusercontent.com/u/452575?v=4","gravatar_id":"","url":"https://api.github.com/users/hackdna","html_url":"https://github.com/hackdna","followers_url":"https://api.github.com/users/hackdna/followers","following_url":"https://api.github.com/users/hackdna/following{/other_user}","gists_url":"https://api.github.com/users/hackdna/gists{/gist_id}","starred_url":"https://api.github.com/users/hackdna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackdna/subscriptions","organizations_url":"https://api.github.com/users/hackdna/orgs","repos_url":"https://api.github.com/users/hackdna/repos","events_url":"https://api.github.com/users/hackdna/events{/privacy}","received_events_url":"https://api.github.com/users/hackdna/received_events","type":"User","site_admin":false},"assignees":[{"login":"hackdna","id":452575,"avatar_url":"https://avatars0.githubusercontent.com/u/452575?v=4","gravatar_id":"","url":"https://api.github.com/users/hackdna","html_url":"https://github.com/hackdna","followers_url":"https://api.github.com/users/hackdna/followers","following_url":"https://api.github.com/users/hackdna/following{/other_user}","gists_url":"https://api.github.com/users/hackdna/gists{/gist_id}","starred_url":"https://api.github.com/users/hackdna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackdna/subscriptions","organizations_url":"https://api.github.com/users/hackdna/orgs","repos_url":"https://api.github.com/users/hackdna/repos","events_url":"https://api.github.com/users/hackdna/events{/privacy}","received_events_url":"https://api.github.com/users/hackdna/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":255148823,"url":"https://api.github.com/repos/refinery-platform/refinery-platform/labels/cloud","name":"cloud","color":"ededed","default":false},{"id":250166624,"url":"https://api.github.com/repos/refinery-platform/refinery-platform/labels/feature","name":"feature","color":"0476E1","default":false},{"id":80397013,"url":"https://api.github.com/repos/refinery-platform/refinery-platform/labels/files","name":"files","color":"ededed","default":false},{"id":743096088,"url":"https://api.github.com/repos/refinery-platform/refinery-platform/labels/fix-4x-medium","name":"fix-4x-medium","color":"11a07e","default":false},{"id":252297690,"url":"https://api.github.com/repos/refinery-platform/refinery-platform/labels/server","name":"server","color":"555555","default":false}],"milestone":{"url":"https://api.github.com/repos/refinery-platform/refinery-platform/milestones/53","html_url":"https://github.com/refinery-platform/refinery-platform/milestone/53","labels_url":"https://api.github.com/repos/refinery-platform/refinery-platform/milestones/53/labels","id":3202931,"number":53,"title":"Release 1.6.4","description":"Implementation of alpha version of new dashboard ui code & design. Stretch goal of ui mockups for metadata editing. Code to periodically collect site statistics. Apis for metadata editing. Development/deployment of a new vis tool wrapping Taggle.","creator":{"login":"jkmarx","id":9956764,"avatar_url":"https://avatars3.githubusercontent.com/u/9956764?v=4","gravatar_id":"","url":"https://api.github.com/users/jkmarx","html_url":"https://github.com/jkmarx","followers_url":"https://api.github.com/users/jkmarx/followers","following_url":"https://api.github.com/users/jkmarx/following{/other_user}","gists_url":"https://api.github.com/users/jkmarx/gists{/gist_id}","starred_url":"https://api.github.com/users/jkmarx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkmarx/subscriptions","organizations_url":"https://api.github.com/users/jkmarx/orgs","repos_url":"https://api.github.com/users/jkmarx/repos","events_url":"https://api.github.com/users/jkmarx/events{/privacy}","received_events_url":"https://api.github.com/users/jkmarx/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":22,"state":"open","created_at":"2018-03-20T12:31:08Z","updated_at":"2018-05-03T14:29:03Z","due_on":"2018-05-04T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls/2737/commits","review_comments_url":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls/2737/comments","review_comment_url":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/refinery-platform/refinery-platform/issues/2737/comments","statuses_url":"https://api.github.com/repos/refinery-platform/refinery-platform/statuses/7aabd05b22272006386203e43f248f73fcde4f42","head":{"label":"refinery-platform:hackdna/s3-datafile-naming","ref":"hackdna/s3-datafile-naming","sha":"7aabd05b22272006386203e43f248f73fcde4f42","user":{"login":"refinery-platform","id":16256162,"avatar_url":"https://avatars0.githubusercontent.com/u/16256162?v=4","gravatar_id":"","url":"https://api.github.com/users/refinery-platform","html_url":"https://github.com/refinery-platform","followers_url":"https://api.github.com/users/refinery-platform/followers","following_url":"https://api.github.com/users/refinery-platform/following{/other_user}","gists_url":"https://api.github.com/users/refinery-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/refinery-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refinery-platform/subscriptions","organizations_url":"https://api.github.com/users/refinery-platform/orgs","repos_url":"https://api.github.com/users/refinery-platform/repos","events_url":"https://api.github.com/users/refinery-platform/events{/privacy}","received_events_url":"https://api.github.com/users/refinery-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":2838735,"name":"refinery-platform","full_name":"refinery-platform/refinery-platform","owner":{"login":"refinery-platform","id":16256162,"avatar_url":"https://avatars0.githubusercontent.com/u/16256162?v=4","gravatar_id":"","url":"https://api.github.com/users/refinery-platform","html_url":"https://github.com/refinery-platform","followers_url":"https://api.github.com/users/refinery-platform/followers","following_url":"https://api.github.com/users/refinery-platform/following{/other_user}","gists_url":"https://api.github.com/users/refinery-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/refinery-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refinery-platform/subscriptions","organizations_url":"https://api.github.com/users/refinery-platform/orgs","repos_url":"https://api.github.com/users/refinery-platform/repos","events_url":"https://api.github.com/users/refinery-platform/events{/privacy}","received_events_url":"https://api.github.com/users/refinery-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/refinery-platform/refinery-platform","description":"The Refinery Platform is a data management, analysis and visualization system for bioinformatics and computational biology applications. The platforms consists of three major components: a data repository with rich metadata capabilities, a workflow engine based on the popular Galaxy system, and visualization tools to support the exploration and interpretation of results at all stages of the analysis process.","fork":false,"url":"https://api.github.com/repos/refinery-platform/refinery-platform","forks_url":"https://api.github.com/repos/refinery-platform/refinery-platform/forks","keys_url":"https://api.github.com/repos/refinery-platform/refinery-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/refinery-platform/refinery-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/refinery-platform/refinery-platform/teams","hooks_url":"https://api.github.com/repos/refinery-platform/refinery-platform/hooks","issue_events_url":"https://api.github.com/repos/refinery-platform/refinery-platform/issues/events{/number}","events_url":"https://api.github.com/repos/refinery-platform/refinery-platform/events","assignees_url":"https://api.github.com/repos/refinery-platform/refinery-platform/assignees{/user}","branches_url":"https://api.github.com/repos/refinery-platform/refinery-platform/branches{/branch}","tags_url":"https://api.github.com/repos/refinery-platform/refinery-platform/tags","blobs_url":"https://api.github.com/repos/refinery-platform/refinery-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/refinery-platform/refinery-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/refinery-platform/refinery-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/refinery-platform/refinery-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/refinery-platform/refinery-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/refinery-platform/refinery-platform/languages","stargazers_url":"https://api.github.com/repos/refinery-platform/refinery-platform/stargazers","contributors_url":"https://api.github.com/repos/refinery-platform/refinery-platform/contributors","subscribers_url":"https://api.github.com/repos/refinery-platform/refinery-platform/subscribers","subscription_url":"https://api.github.com/repos/refinery-platform/refinery-platform/subscription","commits_url":"https://api.github.com/repos/refinery-platform/refinery-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/refinery-platform/refinery-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/refinery-platform/refinery-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/refinery-platform/refinery-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/refinery-platform/refinery-platform/contents/{+path}","compare_url":"https://api.github.com/repos/refinery-platform/refinery-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/refinery-platform/refinery-platform/merges","archive_url":"https://api.github.com/repos/refinery-platform/refinery-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/refinery-platform/refinery-platform/downloads","issues_url":"https://api.github.com/repos/refinery-platform/refinery-platform/issues{/number}","pulls_url":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/refinery-platform/refinery-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/refinery-platform/refinery-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/refinery-platform/refinery-platform/labels{/name}","releases_url":"https://api.github.com/repos/refinery-platform/refinery-platform/releases{/id}","deployments_url":"https://api.github.com/repos/refinery-platform/refinery-platform/deployments","created_at":"2011-11-23T20:23:20Z","updated_at":"2018-05-02T14:25:51Z","pushed_at":"2018-05-02T15:45:46Z","git_url":"git://github.com/refinery-platform/refinery-platform.git","ssh_url":"git@github.com:refinery-platform/refinery-platform.git","clone_url":"https://github.com/refinery-platform/refinery-platform.git","svn_url":"https://github.com/refinery-platform/refinery-platform","homepage":"http://www.refinery-platform.org","size":76940,"stargazers_count":86,"watchers_count":86,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":391,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":15,"open_issues":391,"watchers":86,"default_branch":"develop"}},"base":{"label":"refinery-platform:develop","ref":"develop","sha":"120559a8cb746573301f958446b634838e60e732","user":{"login":"refinery-platform","id":16256162,"avatar_url":"https://avatars0.githubusercontent.com/u/16256162?v=4","gravatar_id":"","url":"https://api.github.com/users/refinery-platform","html_url":"https://github.com/refinery-platform","followers_url":"https://api.github.com/users/refinery-platform/followers","following_url":"https://api.github.com/users/refinery-platform/following{/other_user}","gists_url":"https://api.github.com/users/refinery-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/refinery-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refinery-platform/subscriptions","organizations_url":"https://api.github.com/users/refinery-platform/orgs","repos_url":"https://api.github.com/users/refinery-platform/repos","events_url":"https://api.github.com/users/refinery-platform/events{/privacy}","received_events_url":"https://api.github.com/users/refinery-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":2838735,"name":"refinery-platform","full_name":"refinery-platform/refinery-platform","owner":{"login":"refinery-platform","id":16256162,"avatar_url":"https://avatars0.githubusercontent.com/u/16256162?v=4","gravatar_id":"","url":"https://api.github.com/users/refinery-platform","html_url":"https://github.com/refinery-platform","followers_url":"https://api.github.com/users/refinery-platform/followers","following_url":"https://api.github.com/users/refinery-platform/following{/other_user}","gists_url":"https://api.github.com/users/refinery-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/refinery-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/refinery-platform/subscriptions","organizations_url":"https://api.github.com/users/refinery-platform/orgs","repos_url":"https://api.github.com/users/refinery-platform/repos","events_url":"https://api.github.com/users/refinery-platform/events{/privacy}","received_events_url":"https://api.github.com/users/refinery-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/refinery-platform/refinery-platform","description":"The Refinery Platform is a data management, analysis and visualization system for bioinformatics and computational biology applications. The platforms consists of three major components: a data repository with rich metadata capabilities, a workflow engine based on the popular Galaxy system, and visualization tools to support the exploration and interpretation of results at all stages of the analysis process.","fork":false,"url":"https://api.github.com/repos/refinery-platform/refinery-platform","forks_url":"https://api.github.com/repos/refinery-platform/refinery-platform/forks","keys_url":"https://api.github.com/repos/refinery-platform/refinery-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/refinery-platform/refinery-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/refinery-platform/refinery-platform/teams","hooks_url":"https://api.github.com/repos/refinery-platform/refinery-platform/hooks","issue_events_url":"https://api.github.com/repos/refinery-platform/refinery-platform/issues/events{/number}","events_url":"https://api.github.com/repos/refinery-platform/refinery-platform/events","assignees_url":"https://api.github.com/repos/refinery-platform/refinery-platform/assignees{/user}","branches_url":"https://api.github.com/repos/refinery-platform/refinery-platform/branches{/branch}","tags_url":"https://api.github.com/repos/refinery-platform/refinery-platform/tags","blobs_url":"https://api.github.com/repos/refinery-platform/refinery-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/refinery-platform/refinery-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/refinery-platform/refinery-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/refinery-platform/refinery-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/refinery-platform/refinery-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/refinery-platform/refinery-platform/languages","stargazers_url":"https://api.github.com/repos/refinery-platform/refinery-platform/stargazers","contributors_url":"https://api.github.com/repos/refinery-platform/refinery-platform/contributors","subscribers_url":"https://api.github.com/repos/refinery-platform/refinery-platform/subscribers","subscription_url":"https://api.github.com/repos/refinery-platform/refinery-platform/subscription","commits_url":"https://api.github.com/repos/refinery-platform/refinery-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/refinery-platform/refinery-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/refinery-platform/refinery-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/refinery-platform/refinery-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/refinery-platform/refinery-platform/contents/{+path}","compare_url":"https://api.github.com/repos/refinery-platform/refinery-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/refinery-platform/refinery-platform/merges","archive_url":"https://api.github.com/repos/refinery-platform/refinery-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/refinery-platform/refinery-platform/downloads","issues_url":"https://api.github.com/repos/refinery-platform/refinery-platform/issues{/number}","pulls_url":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/refinery-platform/refinery-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/refinery-platform/refinery-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/refinery-platform/refinery-platform/labels{/name}","releases_url":"https://api.github.com/repos/refinery-platform/refinery-platform/releases{/id}","deployments_url":"https://api.github.com/repos/refinery-platform/refinery-platform/deployments","created_at":"2011-11-23T20:23:20Z","updated_at":"2018-05-02T14:25:51Z","pushed_at":"2018-05-02T15:45:46Z","git_url":"git://github.com/refinery-platform/refinery-platform.git","ssh_url":"git@github.com:refinery-platform/refinery-platform.git","clone_url":"https://github.com/refinery-platform/refinery-platform.git","svn_url":"https://github.com/refinery-platform/refinery-platform","homepage":"http://www.refinery-platform.org","size":76940,"stargazers_count":86,"watchers_count":86,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":391,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":15,"open_issues":391,"watchers":86,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls/2737"},"html":{"href":"https://github.com/refinery-platform/refinery-platform/pull/2737"},"issue":{"href":"https://api.github.com/repos/refinery-platform/refinery-platform/issues/2737"},"comments":{"href":"https://api.github.com/repos/refinery-platform/refinery-platform/issues/2737/comments"},"review_comments":{"href":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls/2737/comments"},"review_comment":{"href":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/refinery-platform/refinery-platform/pulls/2737/commits"},"statuses":{"href":"https://api.github.com/repos/refinery-platform/refinery-platform/statuses/7aabd05b22272006386203e43f248f73fcde4f42"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"hackdna"}}