{"action":"created","comment":{"url":"https://api.github.com/repos/geometalab/osmaxx/pulls/comments/41961686","id":41961686,"diff_hunk":"@@ -0,0 +1,229 @@\n+#!/usr/bin/env python3\n+\n+import logging\n+import os\n+import shutil\n+import subprocess\n+import sys\n+\n+# constants\n+TEST_FILE = \"/data/test.txt\"\n+RED = \"\\033[31m\"\n+GREEN = \"\\033[32m\"\n+MAGENTA = \"\\033[95m\"\n+RESET = \"\\033[0m\"\n+\n+LOGFILE = 'test.log'\n+\n+logger = logging.getLogger(__file__)\n+logger.setLevel(logging.DEBUG)\n+\n+\n+class OsmaxxTestSuite:\n+\n+    def main(self):\n+        # This function will be called when running this script\n+        if os.path.samefile('docker-compose.yml', 'compose-development.yml'):\n+            self.run_development_tests()\n+        else:\n+            self.run_production_tests()\n+\n+        # FIXME: currently only works on development settings\n+        if os.path.samefile('docker-compose.yml', 'compose-development.yml') and os.environ.get('RUN_E2E') == 'true':\n+            self.run_e2e_tests()\n+\n+    def run_e2e_tests(self):\n+        with TmpVirtualEnv() as tmp_venv:","path":"test.py","position":36,"original_position":36,"commit_id":"c37b2f8abf38c513f867f22b3e2db80673ba7e06","original_commit_id":"c37b2f8abf38c513f867f22b3e2db80673ba7e06","user":{"login":"wasabideveloper","id":10944699,"avatar_url":"https://avatars.githubusercontent.com/u/10944699?v=3","gravatar_id":"","url":"https://api.github.com/users/wasabideveloper","html_url":"https://github.com/wasabideveloper","followers_url":"https://api.github.com/users/wasabideveloper/followers","following_url":"https://api.github.com/users/wasabideveloper/following{/other_user}","gists_url":"https://api.github.com/users/wasabideveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/wasabideveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wasabideveloper/subscriptions","organizations_url":"https://api.github.com/users/wasabideveloper/orgs","repos_url":"https://api.github.com/users/wasabideveloper/repos","events_url":"https://api.github.com/users/wasabideveloper/events{/privacy}","received_events_url":"https://api.github.com/users/wasabideveloper/received_events","type":"User","site_admin":false},"body":"In this local context the variable name is o.k. but in other context nobody would understand what ´tmp_venv´ is.","created_at":"2015-10-14T07:18:36Z","updated_at":"2015-10-14T07:18:36Z","html_url":"https://github.com/geometalab/osmaxx/pull/237#discussion_r41961686","pull_request_url":"https://api.github.com/repos/geometalab/osmaxx/pulls/237","_links":{"self":{"href":"https://api.github.com/repos/geometalab/osmaxx/pulls/comments/41961686"},"html":{"href":"https://github.com/geometalab/osmaxx/pull/237#discussion_r41961686"},"pull_request":{"href":"https://api.github.com/repos/geometalab/osmaxx/pulls/237"}}},"pull_request":{"url":"https://api.github.com/repos/geometalab/osmaxx/pulls/237","id":47550936,"html_url":"https://github.com/geometalab/osmaxx/pull/237","diff_url":"https://github.com/geometalab/osmaxx/pull/237.diff","patch_url":"https://github.com/geometalab/osmaxx/pull/237.patch","issue_url":"https://api.github.com/repos/geometalab/osmaxx/issues/237","number":237,"state":"open","locked":false,"title":"Feature/refactor test script","user":{"login":"das-g","id":97746,"avatar_url":"https://avatars.githubusercontent.com/u/97746?v=3","gravatar_id":"","url":"https://api.github.com/users/das-g","html_url":"https://github.com/das-g","followers_url":"https://api.github.com/users/das-g/followers","following_url":"https://api.github.com/users/das-g/following{/other_user}","gists_url":"https://api.github.com/users/das-g/gists{/gist_id}","starred_url":"https://api.github.com/users/das-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/das-g/subscriptions","organizations_url":"https://api.github.com/users/das-g/orgs","repos_url":"https://api.github.com/users/das-g/repos","events_url":"https://api.github.com/users/das-g/events{/privacy}","received_events_url":"https://api.github.com/users/das-g/received_events","type":"User","site_admin":false},"body":"preparation for #222 \r\n\r\n* translated `test.sh` to python 3\r\n* refactored it somewhat (might need more refactoring)\r\n\r\nreviewed by:\r\n- [ ] @njordan-hsr \r\n- [ ] @wasabideveloper ","created_at":"2015-10-13T15:46:01Z","updated_at":"2015-10-14T07:18:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82bccb432a4017b485b1a22a6d4b8d2b694fbbc0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/geometalab/osmaxx/pulls/237/commits","review_comments_url":"https://api.github.com/repos/geometalab/osmaxx/pulls/237/comments","review_comment_url":"https://api.github.com/repos/geometalab/osmaxx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geometalab/osmaxx/issues/237/comments","statuses_url":"https://api.github.com/repos/geometalab/osmaxx/statuses/c37b2f8abf38c513f867f22b3e2db80673ba7e06","head":{"label":"geometalab:feature/refactor_test_script","ref":"feature/refactor_test_script","sha":"c37b2f8abf38c513f867f22b3e2db80673ba7e06","user":{"login":"geometalab","id":8266374,"avatar_url":"https://avatars.githubusercontent.com/u/8266374?v=3","gravatar_id":"","url":"https://api.github.com/users/geometalab","html_url":"https://github.com/geometalab","followers_url":"https://api.github.com/users/geometalab/followers","following_url":"https://api.github.com/users/geometalab/following{/other_user}","gists_url":"https://api.github.com/users/geometalab/gists{/gist_id}","starred_url":"https://api.github.com/users/geometalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geometalab/subscriptions","organizations_url":"https://api.github.com/users/geometalab/orgs","repos_url":"https://api.github.com/users/geometalab/repos","events_url":"https://api.github.com/users/geometalab/events{/privacy}","received_events_url":"https://api.github.com/users/geometalab/received_events","type":"Organization","site_admin":false},"repo":{"id":28986110,"name":"osmaxx","full_name":"geometalab/osmaxx","owner":{"login":"geometalab","id":8266374,"avatar_url":"https://avatars.githubusercontent.com/u/8266374?v=3","gravatar_id":"","url":"https://api.github.com/users/geometalab","html_url":"https://github.com/geometalab","followers_url":"https://api.github.com/users/geometalab/followers","following_url":"https://api.github.com/users/geometalab/following{/other_user}","gists_url":"https://api.github.com/users/geometalab/gists{/gist_id}","starred_url":"https://api.github.com/users/geometalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geometalab/subscriptions","organizations_url":"https://api.github.com/users/geometalab/orgs","repos_url":"https://api.github.com/users/geometalab/repos","events_url":"https://api.github.com/users/geometalab/events{/privacy}","received_events_url":"https://api.github.com/users/geometalab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geometalab/osmaxx","description":"OpenStreetMap Arbitrary eXcerpt eXport (main repository)","fork":false,"url":"https://api.github.com/repos/geometalab/osmaxx","forks_url":"https://api.github.com/repos/geometalab/osmaxx/forks","keys_url":"https://api.github.com/repos/geometalab/osmaxx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geometalab/osmaxx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geometalab/osmaxx/teams","hooks_url":"https://api.github.com/repos/geometalab/osmaxx/hooks","issue_events_url":"https://api.github.com/repos/geometalab/osmaxx/issues/events{/number}","events_url":"https://api.github.com/repos/geometalab/osmaxx/events","assignees_url":"https://api.github.com/repos/geometalab/osmaxx/assignees{/user}","branches_url":"https://api.github.com/repos/geometalab/osmaxx/branches{/branch}","tags_url":"https://api.github.com/repos/geometalab/osmaxx/tags","blobs_url":"https://api.github.com/repos/geometalab/osmaxx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geometalab/osmaxx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geometalab/osmaxx/git/refs{/sha}","trees_url":"https://api.github.com/repos/geometalab/osmaxx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geometalab/osmaxx/statuses/{sha}","languages_url":"https://api.github.com/repos/geometalab/osmaxx/languages","stargazers_url":"https://api.github.com/repos/geometalab/osmaxx/stargazers","contributors_url":"https://api.github.com/repos/geometalab/osmaxx/contributors","subscribers_url":"https://api.github.com/repos/geometalab/osmaxx/subscribers","subscription_url":"https://api.github.com/repos/geometalab/osmaxx/subscription","commits_url":"https://api.github.com/repos/geometalab/osmaxx/commits{/sha}","git_commits_url":"https://api.github.com/repos/geometalab/osmaxx/git/commits{/sha}","comments_url":"https://api.github.com/repos/geometalab/osmaxx/comments{/number}","issue_comment_url":"https://api.github.com/repos/geometalab/osmaxx/issues/comments{/number}","contents_url":"https://api.github.com/repos/geometalab/osmaxx/contents/{+path}","compare_url":"https://api.github.com/repos/geometalab/osmaxx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geometalab/osmaxx/merges","archive_url":"https://api.github.com/repos/geometalab/osmaxx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geometalab/osmaxx/downloads","issues_url":"https://api.github.com/repos/geometalab/osmaxx/issues{/number}","pulls_url":"https://api.github.com/repos/geometalab/osmaxx/pulls{/number}","milestones_url":"https://api.github.com/repos/geometalab/osmaxx/milestones{/number}","notifications_url":"https://api.github.com/repos/geometalab/osmaxx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geometalab/osmaxx/labels{/name}","releases_url":"https://api.github.com/repos/geometalab/osmaxx/releases{/id}","created_at":"2015-01-08T21:05:34Z","updated_at":"2015-10-04T10:35:53Z","pushed_at":"2015-10-14T06:26:56Z","git_url":"git://github.com/geometalab/osmaxx.git","ssh_url":"git@github.com:geometalab/osmaxx.git","clone_url":"https://github.com/geometalab/osmaxx.git","svn_url":"https://github.com/geometalab/osmaxx","homepage":"http://osmaxx.hsr.ch/","size":3408,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":41,"forks":0,"open_issues":41,"watchers":2,"default_branch":"develop"}},"base":{"label":"geometalab:develop","ref":"develop","sha":"b039b3abd172d7d28a2e2eacccbae69f9e13210c","user":{"login":"geometalab","id":8266374,"avatar_url":"https://avatars.githubusercontent.com/u/8266374?v=3","gravatar_id":"","url":"https://api.github.com/users/geometalab","html_url":"https://github.com/geometalab","followers_url":"https://api.github.com/users/geometalab/followers","following_url":"https://api.github.com/users/geometalab/following{/other_user}","gists_url":"https://api.github.com/users/geometalab/gists{/gist_id}","starred_url":"https://api.github.com/users/geometalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geometalab/subscriptions","organizations_url":"https://api.github.com/users/geometalab/orgs","repos_url":"https://api.github.com/users/geometalab/repos","events_url":"https://api.github.com/users/geometalab/events{/privacy}","received_events_url":"https://api.github.com/users/geometalab/received_events","type":"Organization","site_admin":false},"repo":{"id":28986110,"name":"osmaxx","full_name":"geometalab/osmaxx","owner":{"login":"geometalab","id":8266374,"avatar_url":"https://avatars.githubusercontent.com/u/8266374?v=3","gravatar_id":"","url":"https://api.github.com/users/geometalab","html_url":"https://github.com/geometalab","followers_url":"https://api.github.com/users/geometalab/followers","following_url":"https://api.github.com/users/geometalab/following{/other_user}","gists_url":"https://api.github.com/users/geometalab/gists{/gist_id}","starred_url":"https://api.github.com/users/geometalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geometalab/subscriptions","organizations_url":"https://api.github.com/users/geometalab/orgs","repos_url":"https://api.github.com/users/geometalab/repos","events_url":"https://api.github.com/users/geometalab/events{/privacy}","received_events_url":"https://api.github.com/users/geometalab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geometalab/osmaxx","description":"OpenStreetMap Arbitrary eXcerpt eXport (main repository)","fork":false,"url":"https://api.github.com/repos/geometalab/osmaxx","forks_url":"https://api.github.com/repos/geometalab/osmaxx/forks","keys_url":"https://api.github.com/repos/geometalab/osmaxx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geometalab/osmaxx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geometalab/osmaxx/teams","hooks_url":"https://api.github.com/repos/geometalab/osmaxx/hooks","issue_events_url":"https://api.github.com/repos/geometalab/osmaxx/issues/events{/number}","events_url":"https://api.github.com/repos/geometalab/osmaxx/events","assignees_url":"https://api.github.com/repos/geometalab/osmaxx/assignees{/user}","branches_url":"https://api.github.com/repos/geometalab/osmaxx/branches{/branch}","tags_url":"https://api.github.com/repos/geometalab/osmaxx/tags","blobs_url":"https://api.github.com/repos/geometalab/osmaxx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geometalab/osmaxx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geometalab/osmaxx/git/refs{/sha}","trees_url":"https://api.github.com/repos/geometalab/osmaxx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geometalab/osmaxx/statuses/{sha}","languages_url":"https://api.github.com/repos/geometalab/osmaxx/languages","stargazers_url":"https://api.github.com/repos/geometalab/osmaxx/stargazers","contributors_url":"https://api.github.com/repos/geometalab/osmaxx/contributors","subscribers_url":"https://api.github.com/repos/geometalab/osmaxx/subscribers","subscription_url":"https://api.github.com/repos/geometalab/osmaxx/subscription","commits_url":"https://api.github.com/repos/geometalab/osmaxx/commits{/sha}","git_commits_url":"https://api.github.com/repos/geometalab/osmaxx/git/commits{/sha}","comments_url":"https://api.github.com/repos/geometalab/osmaxx/comments{/number}","issue_comment_url":"https://api.github.com/repos/geometalab/osmaxx/issues/comments{/number}","contents_url":"https://api.github.com/repos/geometalab/osmaxx/contents/{+path}","compare_url":"https://api.github.com/repos/geometalab/osmaxx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geometalab/osmaxx/merges","archive_url":"https://api.github.com/repos/geometalab/osmaxx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geometalab/osmaxx/downloads","issues_url":"https://api.github.com/repos/geometalab/osmaxx/issues{/number}","pulls_url":"https://api.github.com/repos/geometalab/osmaxx/pulls{/number}","milestones_url":"https://api.github.com/repos/geometalab/osmaxx/milestones{/number}","notifications_url":"https://api.github.com/repos/geometalab/osmaxx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geometalab/osmaxx/labels{/name}","releases_url":"https://api.github.com/repos/geometalab/osmaxx/releases{/id}","created_at":"2015-01-08T21:05:34Z","updated_at":"2015-10-04T10:35:53Z","pushed_at":"2015-10-14T06:26:56Z","git_url":"git://github.com/geometalab/osmaxx.git","ssh_url":"git@github.com:geometalab/osmaxx.git","clone_url":"https://github.com/geometalab/osmaxx.git","svn_url":"https://github.com/geometalab/osmaxx","homepage":"http://osmaxx.hsr.ch/","size":3408,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":41,"forks":0,"open_issues":41,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/geometalab/osmaxx/pulls/237"},"html":{"href":"https://github.com/geometalab/osmaxx/pull/237"},"issue":{"href":"https://api.github.com/repos/geometalab/osmaxx/issues/237"},"comments":{"href":"https://api.github.com/repos/geometalab/osmaxx/issues/237/comments"},"review_comments":{"href":"https://api.github.com/repos/geometalab/osmaxx/pulls/237/comments"},"review_comment":{"href":"https://api.github.com/repos/geometalab/osmaxx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geometalab/osmaxx/pulls/237/commits"},"statuses":{"href":"https://api.github.com/repos/geometalab/osmaxx/statuses/c37b2f8abf38c513f867f22b3e2db80673ba7e06"}}}}