{"action":"created","comment":{"url":"https://api.github.com/repos/fossasia/open-event-server/pulls/comments/244535445","pull_request_review_id":188440630,"id":244535445,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDUzNTQ0NQ==","diff_hunk":"@@ -0,0 +1,44 @@\n+import unittest\n+from unittest.mock import patch\n+\n+from app.api.helpers.files import make_frontend_url\n+\n+class TestFilesMethods(unittest.TestCase):\n+\n+    def test_frontend_url(self):\n+        \"\"\"Test whether frontend_url is created correctly\"\"\"\n+\n+        def patch_settings(settings, url):\n+            settings.return_value = {\n+                'frontend_url': url\n+            }\n+\n+        with patch('app.api.helpers.files.get_settings') as get_settings:\n+            get_settings.return_value = {}\n+            self.assertEqual('verify?token=hi', \n+                             make_frontend_url('/verify', {'token': 'hi'}))\n+\n+            patch_settings(get_settings, 'https://next.eventyay.com/')\n+            self.assertEqual('https://next.eventyay.com/verify?token=ok_this_is_a_secret', \n+                             make_frontend_url('/verify', {'token': 'ok_this_is_a_secret'}))\n+\n+            self.assertEqual('https://next.eventyay.com/verify?token=ok_this_is_a_secret', \n+                             make_frontend_url('/verify', {'token': 'ok_this_is_a_secret'}))\n+            \n+            self.assertEqual('https://next.eventyay.com/verify', \n+                             make_frontend_url('/verify'))\n+            \n+            patch_settings(get_settings, 'https://next.eventyay.com')\n+            self.assertEqual('https://next.eventyay.com/verify?token=ok_this_is_a_secret', \n+                             make_frontend_url('verify', {'token': 'ok_this_is_a_secret'}))\n+            \n+            patch_settings(get_settings, 'https://fossasia.github.io/open-event-frontend/')\n+            self.assertEqual('https://fossasia.github.io/open-event-frontend/verify?token=ok_this_is_a_secret', \n+                             make_frontend_url('/verify', {'token': 'ok_this_is_a_secret'}))\n+            \n+            patch_settings(get_settings, 'https://fossasia.github.io/open-event-frontend')\n+            self.assertEqual('https://fossasia.github.io/open-event-frontend/verify?token=ok_this_is_a_secret', \n+                             make_frontend_url('/verify', {'token': 'ok_this_is_a_secret'}))\n+\n+if __name__ == '__main__':","path":"tests/all/unit/api/helpers/test_files.py","position":43,"original_position":43,"commit_id":"629cada63f25837f7991e6e8213e4db7e968b948","original_commit_id":"629cada63f25837f7991e6e8213e4db7e968b948","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"expected 2 blank lines after class or function definition, found 1","created_at":"2018-12-30T14:07:03Z","updated_at":"2018-12-30T14:07:05Z","html_url":"https://github.com/fossasia/open-event-server/pull/5500#discussion_r244535445","pull_request_url":"https://api.github.com/repos/fossasia/open-event-server/pulls/5500","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/fossasia/open-event-server/pulls/comments/244535445"},"html":{"href":"https://github.com/fossasia/open-event-server/pull/5500#discussion_r244535445"},"pull_request":{"href":"https://api.github.com/repos/fossasia/open-event-server/pulls/5500"}}},"pull_request":{"url":"https://api.github.com/repos/fossasia/open-event-server/pulls/5500","id":241492925,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNDkyOTI1","html_url":"https://github.com/fossasia/open-event-server/pull/5500","diff_url":"https://github.com/fossasia/open-event-server/pull/5500.diff","patch_url":"https://github.com/fossasia/open-event-server/pull/5500.patch","issue_url":"https://api.github.com/repos/fossasia/open-event-server/issues/5500","number":5500,"state":"open","locked":false,"title":"refactor: Move tests to appropriate modules","user":{"login":"iamareebjamal","id":3874064,"node_id":"MDQ6VXNlcjM4NzQwNjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3874064?v=4","gravatar_id":"","url":"https://api.github.com/users/iamareebjamal","html_url":"https://github.com/iamareebjamal","followers_url":"https://api.github.com/users/iamareebjamal/followers","following_url":"https://api.github.com/users/iamareebjamal/following{/other_user}","gists_url":"https://api.github.com/users/iamareebjamal/gists{/gist_id}","starred_url":"https://api.github.com/users/iamareebjamal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamareebjamal/subscriptions","organizations_url":"https://api.github.com/users/iamareebjamal/orgs","repos_url":"https://api.github.com/users/iamareebjamal/repos","events_url":"https://api.github.com/users/iamareebjamal/events{/privacy}","received_events_url":"https://api.github.com/users/iamareebjamal/received_events","type":"User","site_admin":false},"body":"\r\n\r\n<!--\r\n(Thanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.)\r\n-->\r\n<!-- Add the issue number that is fixed by this PR (In the form Fixes #123) -->\r\n\r\nFixes #5499 \r\n\r\n#### Checklist\r\n\r\n- [x] I have read the [Contribution & Best practices Guide](https://blog.fossasia.org/open-source-developer-guide-and-best-practices-at-fossasia) and my PR follows them.\r\n- [x] My branch is up-to-date with the Upstream `development` branch.\r\n- [x] The unit tests pass locally with my changes <!-- use `nosetests tests/unittests` to run all the tests -->\r\n- [x] I have added tests that prove my fix is effective or that my feature works\r\n- [x] I have added necessary documentation (if appropriate)\r\n<!-- If an existing function does not have a docstring, please add one -->\r\n- [x] All the functions created/modified in this PR contain relevant docstrings.\r\n\r\n#### Short description of what this resolves:\r\n\r\n\r\n#### Changes proposed in this pull request:\r\n\r\n- Move tests to unit and integration modules\r\n- Fix and add tests for make_frontend_url\r\n\r\n","created_at":"2018-12-30T14:06:50Z","updated_at":"2018-12-30T14:07:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49477c8b4b8e9c9530d257bd5cf31015a9076da4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fossasia/open-event-server/pulls/5500/commits","review_comments_url":"https://api.github.com/repos/fossasia/open-event-server/pulls/5500/comments","review_comment_url":"https://api.github.com/repos/fossasia/open-event-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fossasia/open-event-server/issues/5500/comments","statuses_url":"https://api.github.com/repos/fossasia/open-event-server/statuses/629cada63f25837f7991e6e8213e4db7e968b948","head":{"label":"iamareebjamal:unit-tests","ref":"unit-tests","sha":"629cada63f25837f7991e6e8213e4db7e968b948","user":{"login":"iamareebjamal","id":3874064,"node_id":"MDQ6VXNlcjM4NzQwNjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3874064?v=4","gravatar_id":"","url":"https://api.github.com/users/iamareebjamal","html_url":"https://github.com/iamareebjamal","followers_url":"https://api.github.com/users/iamareebjamal/followers","following_url":"https://api.github.com/users/iamareebjamal/following{/other_user}","gists_url":"https://api.github.com/users/iamareebjamal/gists{/gist_id}","starred_url":"https://api.github.com/users/iamareebjamal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamareebjamal/subscriptions","organizations_url":"https://api.github.com/users/iamareebjamal/orgs","repos_url":"https://api.github.com/users/iamareebjamal/repos","events_url":"https://api.github.com/users/iamareebjamal/events{/privacy}","received_events_url":"https://api.github.com/users/iamareebjamal/received_events","type":"User","site_admin":false},"repo":{"id":123668906,"node_id":"MDEwOlJlcG9zaXRvcnkxMjM2Njg5MDY=","name":"open-event-server","full_name":"iamareebjamal/open-event-server","private":false,"owner":{"login":"iamareebjamal","id":3874064,"node_id":"MDQ6VXNlcjM4NzQwNjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3874064?v=4","gravatar_id":"","url":"https://api.github.com/users/iamareebjamal","html_url":"https://github.com/iamareebjamal","followers_url":"https://api.github.com/users/iamareebjamal/followers","following_url":"https://api.github.com/users/iamareebjamal/following{/other_user}","gists_url":"https://api.github.com/users/iamareebjamal/gists{/gist_id}","starred_url":"https://api.github.com/users/iamareebjamal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamareebjamal/subscriptions","organizations_url":"https://api.github.com/users/iamareebjamal/orgs","repos_url":"https://api.github.com/users/iamareebjamal/repos","events_url":"https://api.github.com/users/iamareebjamal/events{/privacy}","received_events_url":"https://api.github.com/users/iamareebjamal/received_events","type":"User","site_admin":false},"html_url":"https://github.com/iamareebjamal/open-event-server","description":"The Open Event Organizer Server to Manage Events","fork":true,"url":"https://api.github.com/repos/iamareebjamal/open-event-server","forks_url":"https://api.github.com/repos/iamareebjamal/open-event-server/forks","keys_url":"https://api.github.com/repos/iamareebjamal/open-event-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iamareebjamal/open-event-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iamareebjamal/open-event-server/teams","hooks_url":"https://api.github.com/repos/iamareebjamal/open-event-server/hooks","issue_events_url":"https://api.github.com/repos/iamareebjamal/open-event-server/issues/events{/number}","events_url":"https://api.github.com/repos/iamareebjamal/open-event-server/events","assignees_url":"https://api.github.com/repos/iamareebjamal/open-event-server/assignees{/user}","branches_url":"https://api.github.com/repos/iamareebjamal/open-event-server/branches{/branch}","tags_url":"https://api.github.com/repos/iamareebjamal/open-event-server/tags","blobs_url":"https://api.github.com/repos/iamareebjamal/open-event-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iamareebjamal/open-event-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iamareebjamal/open-event-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/iamareebjamal/open-event-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iamareebjamal/open-event-server/statuses/{sha}","languages_url":"https://api.github.com/repos/iamareebjamal/open-event-server/languages","stargazers_url":"https://api.github.com/repos/iamareebjamal/open-event-server/stargazers","contributors_url":"https://api.github.com/repos/iamareebjamal/open-event-server/contributors","subscribers_url":"https://api.github.com/repos/iamareebjamal/open-event-server/subscribers","subscription_url":"https://api.github.com/repos/iamareebjamal/open-event-server/subscription","commits_url":"https://api.github.com/repos/iamareebjamal/open-event-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/iamareebjamal/open-event-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/iamareebjamal/open-event-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/iamareebjamal/open-event-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/iamareebjamal/open-event-server/contents/{+path}","compare_url":"https://api.github.com/repos/iamareebjamal/open-event-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iamareebjamal/open-event-server/merges","archive_url":"https://api.github.com/repos/iamareebjamal/open-event-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iamareebjamal/open-event-server/downloads","issues_url":"https://api.github.com/repos/iamareebjamal/open-event-server/issues{/number}","pulls_url":"https://api.github.com/repos/iamareebjamal/open-event-server/pulls{/number}","milestones_url":"https://api.github.com/repos/iamareebjamal/open-event-server/milestones{/number}","notifications_url":"https://api.github.com/repos/iamareebjamal/open-event-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iamareebjamal/open-event-server/labels{/name}","releases_url":"https://api.github.com/repos/iamareebjamal/open-event-server/releases{/id}","deployments_url":"https://api.github.com/repos/iamareebjamal/open-event-server/deployments","created_at":"2018-03-03T07:14:06Z","updated_at":"2018-12-09T05:32:05Z","pushed_at":"2018-12-30T14:06:10Z","git_url":"git://github.com/iamareebjamal/open-event-server.git","ssh_url":"git@github.com:iamareebjamal/open-event-server.git","clone_url":"https://github.com/iamareebjamal/open-event-server.git","svn_url":"https://github.com/iamareebjamal/open-event-server","homepage":"http://open-event-api.herokuapp.com/","size":46038,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"fossasia:development","ref":"development","sha":"e34d385a7b2dfadc0e6c262a44d1cb0e4bbad0c7","user":{"login":"fossasia","id":6295529,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyOTU1Mjk=","avatar_url":"https://avatars3.githubusercontent.com/u/6295529?v=4","gravatar_id":"","url":"https://api.github.com/users/fossasia","html_url":"https://github.com/fossasia","followers_url":"https://api.github.com/users/fossasia/followers","following_url":"https://api.github.com/users/fossasia/following{/other_user}","gists_url":"https://api.github.com/users/fossasia/gists{/gist_id}","starred_url":"https://api.github.com/users/fossasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossasia/subscriptions","organizations_url":"https://api.github.com/users/fossasia/orgs","repos_url":"https://api.github.com/users/fossasia/repos","events_url":"https://api.github.com/users/fossasia/events{/privacy}","received_events_url":"https://api.github.com/users/fossasia/received_events","type":"Organization","site_admin":false},"repo":{"id":35270176,"node_id":"MDEwOlJlcG9zaXRvcnkzNTI3MDE3Ng==","name":"open-event-server","full_name":"fossasia/open-event-server","private":false,"owner":{"login":"fossasia","id":6295529,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyOTU1Mjk=","avatar_url":"https://avatars3.githubusercontent.com/u/6295529?v=4","gravatar_id":"","url":"https://api.github.com/users/fossasia","html_url":"https://github.com/fossasia","followers_url":"https://api.github.com/users/fossasia/followers","following_url":"https://api.github.com/users/fossasia/following{/other_user}","gists_url":"https://api.github.com/users/fossasia/gists{/gist_id}","starred_url":"https://api.github.com/users/fossasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossasia/subscriptions","organizations_url":"https://api.github.com/users/fossasia/orgs","repos_url":"https://api.github.com/users/fossasia/repos","events_url":"https://api.github.com/users/fossasia/events{/privacy}","received_events_url":"https://api.github.com/users/fossasia/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/fossasia/open-event-server","description":"The Open Event Organizer Server to Manage Events http://open-event-api.herokuapp.com","fork":false,"url":"https://api.github.com/repos/fossasia/open-event-server","forks_url":"https://api.github.com/repos/fossasia/open-event-server/forks","keys_url":"https://api.github.com/repos/fossasia/open-event-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fossasia/open-event-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fossasia/open-event-server/teams","hooks_url":"https://api.github.com/repos/fossasia/open-event-server/hooks","issue_events_url":"https://api.github.com/repos/fossasia/open-event-server/issues/events{/number}","events_url":"https://api.github.com/repos/fossasia/open-event-server/events","assignees_url":"https://api.github.com/repos/fossasia/open-event-server/assignees{/user}","branches_url":"https://api.github.com/repos/fossasia/open-event-server/branches{/branch}","tags_url":"https://api.github.com/repos/fossasia/open-event-server/tags","blobs_url":"https://api.github.com/repos/fossasia/open-event-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fossasia/open-event-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fossasia/open-event-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/fossasia/open-event-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fossasia/open-event-server/statuses/{sha}","languages_url":"https://api.github.com/repos/fossasia/open-event-server/languages","stargazers_url":"https://api.github.com/repos/fossasia/open-event-server/stargazers","contributors_url":"https://api.github.com/repos/fossasia/open-event-server/contributors","subscribers_url":"https://api.github.com/repos/fossasia/open-event-server/subscribers","subscription_url":"https://api.github.com/repos/fossasia/open-event-server/subscription","commits_url":"https://api.github.com/repos/fossasia/open-event-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/fossasia/open-event-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/fossasia/open-event-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/fossasia/open-event-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/fossasia/open-event-server/contents/{+path}","compare_url":"https://api.github.com/repos/fossasia/open-event-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fossasia/open-event-server/merges","archive_url":"https://api.github.com/repos/fossasia/open-event-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fossasia/open-event-server/downloads","issues_url":"https://api.github.com/repos/fossasia/open-event-server/issues{/number}","pulls_url":"https://api.github.com/repos/fossasia/open-event-server/pulls{/number}","milestones_url":"https://api.github.com/repos/fossasia/open-event-server/milestones{/number}","notifications_url":"https://api.github.com/repos/fossasia/open-event-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fossasia/open-event-server/labels{/name}","releases_url":"https://api.github.com/repos/fossasia/open-event-server/releases{/id}","deployments_url":"https://api.github.com/repos/fossasia/open-event-server/deployments","created_at":"2015-05-08T09:16:19Z","updated_at":"2018-12-30T10:23:46Z","pushed_at":"2018-12-30T14:06:51Z","git_url":"git://github.com/fossasia/open-event-server.git","ssh_url":"git@github.com:fossasia/open-event-server.git","clone_url":"https://github.com/fossasia/open-event-server.git","svn_url":"https://github.com/fossasia/open-event-server","homepage":"","size":46700,"stargazers_count":1529,"watchers_count":1529,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1071,"mirror_url":null,"archived":false,"open_issues_count":67,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":1071,"open_issues":67,"watchers":1529,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/fossasia/open-event-server/pulls/5500"},"html":{"href":"https://github.com/fossasia/open-event-server/pull/5500"},"issue":{"href":"https://api.github.com/repos/fossasia/open-event-server/issues/5500"},"comments":{"href":"https://api.github.com/repos/fossasia/open-event-server/issues/5500/comments"},"review_comments":{"href":"https://api.github.com/repos/fossasia/open-event-server/pulls/5500/comments"},"review_comment":{"href":"https://api.github.com/repos/fossasia/open-event-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fossasia/open-event-server/pulls/5500/commits"},"statuses":{"href":"https://api.github.com/repos/fossasia/open-event-server/statuses/629cada63f25837f7991e6e8213e4db7e968b948"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"houndci-bot"}}