{"action":"created","comment":{"url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls/comments/46524318","id":46524318,"diff_hunk":"@@ -0,0 +1,128 @@\n+import unittest\n+import json\n+\n+from django.test import TestCase\n+from django.test import Client\n+from django.contrib.auth import authenticate\n+from django.contrib.auth.models import User\n+\n+from carcassonne.models import Workplace, Office, Floor, Room\n+from carcassonne.helpers import sse\n+\n+class GetEployeesTestCase(TestCase):\n+\n+    user_login = 'foo'\n+    user_password = 'bar'\n+    workplace_number = 10\n+\n+    @classmethod\n+    def setUpClass(cls):\n+        office = Office(name='Kyiv1', address='someaddr')\n+        office.save()\n+        floor = Floor(plan='media/floor_image/linux.png',\n+                      office=office,\n+                      number=4)\n+        floor.save()\n+        room = Room(floor=floor, number='421', coordinates='[]')\n+        room.save()\n+        for i in range(cls.workplace_number):\n+            workplace = Workplace(\n+                coordinates=[[\n+                    [12.421875 + i * 0,5, 14.0390625 + i * 0,5],\n+                    [12.421875 + i * 0,5, 14.7890625 + i * 0,5],\n+                    [13.171875 + i * 0,5, 14.7890625 + i * 0,5],\n+                    [13.171875 + i * 0,5, 14.0390625 + i * 0,5],\n+                    [12.421875 + i * 0,5, 14.0390625 + i * 0,5]]],\n+                room=room,\n+                number=i,\n+                is_occupied=True)\n+            workplace.save()\n+\n+    @classmethod\n+    def tearDownClass(cls):\n+        cls.cls_atomics = True\n+\n+    def setUp(self):\n+        self._client = Client()\n+\n+    def tearDown(self):\n+        self._client.cookies.clear()\n+        user = authenticate(username=self.user_login,\n+                            password=self.user_password)\n+        if user is not None:\n+            user.delete()\n+\n+    def loggining(self):\n+        user = authenticate(username=self.user_login,\n+                            password=self.user_password)\n+        if user is None:\n+            u = User(username=self.user_login,\n+                     email='{}@example.com'.format(self.user_login))\n+            u.set_password('bar')\n+            u.save()","path":"SSP/api/tests/test_workplaces_get.py","position":62,"original_position":62,"commit_id":"f7eeebd8e88963d13317f879966a20b75d6859e4","original_commit_id":"f7eeebd8e88963d13317f879966a20b75d6859e4","user":{"login":"Fedorof","id":2283679,"avatar_url":"https://avatars.githubusercontent.com/u/2283679?v=3","gravatar_id":"","url":"https://api.github.com/users/Fedorof","html_url":"https://github.com/Fedorof","followers_url":"https://api.github.com/users/Fedorof/followers","following_url":"https://api.github.com/users/Fedorof/following{/other_user}","gists_url":"https://api.github.com/users/Fedorof/gists{/gist_id}","starred_url":"https://api.github.com/users/Fedorof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fedorof/subscriptions","organizations_url":"https://api.github.com/users/Fedorof/orgs","repos_url":"https://api.github.com/users/Fedorof/repos","events_url":"https://api.github.com/users/Fedorof/events{/privacy}","received_events_url":"https://api.github.com/users/Fedorof/received_events","type":"User","site_admin":false},"body":"Move user creation to setUpClass as well?","created_at":"2015-12-03T08:31:35Z","updated_at":"2015-12-03T08:31:35Z","html_url":"https://github.com/ITsvetkoFF/Kv-011/pull/65#discussion_r46524318","pull_request_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls/comments/46524318"},"html":{"href":"https://github.com/ITsvetkoFF/Kv-011/pull/65#discussion_r46524318"},"pull_request":{"href":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls/65"}}},"pull_request":{"url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls/65","id":52390898,"html_url":"https://github.com/ITsvetkoFF/Kv-011/pull/65","diff_url":"https://github.com/ITsvetkoFF/Kv-011/pull/65.diff","patch_url":"https://github.com/ITsvetkoFF/Kv-011/pull/65.patch","issue_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/issues/65","number":65,"state":"open","locked":false,"title":"unite workplaces method post & get","user":{"login":"OlefirenkoK","id":13385711,"avatar_url":"https://avatars.githubusercontent.com/u/13385711?v=3","gravatar_id":"","url":"https://api.github.com/users/OlefirenkoK","html_url":"https://github.com/OlefirenkoK","followers_url":"https://api.github.com/users/OlefirenkoK/followers","following_url":"https://api.github.com/users/OlefirenkoK/following{/other_user}","gists_url":"https://api.github.com/users/OlefirenkoK/gists{/gist_id}","starred_url":"https://api.github.com/users/OlefirenkoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlefirenkoK/subscriptions","organizations_url":"https://api.github.com/users/OlefirenkoK/orgs","repos_url":"https://api.github.com/users/OlefirenkoK/repos","events_url":"https://api.github.com/users/OlefirenkoK/events{/privacy}","received_events_url":"https://api.github.com/users/OlefirenkoK/received_events","type":"User","site_admin":false},"body":"unite workplaces method post & get","created_at":"2015-12-02T12:44:56Z","updated_at":"2015-12-03T08:31:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls/65/commits","review_comments_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls/65/comments","review_comment_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/issues/65/comments","statuses_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/statuses/f7eeebd8e88963d13317f879966a20b75d6859e4","head":{"label":"ITsvetkoFF:features/SSP-95/workplaces-get_fix","ref":"features/SSP-95/workplaces-get_fix","sha":"f7eeebd8e88963d13317f879966a20b75d6859e4","user":{"login":"ITsvetkoFF","id":7273003,"avatar_url":"https://avatars.githubusercontent.com/u/7273003?v=3","gravatar_id":"","url":"https://api.github.com/users/ITsvetkoFF","html_url":"https://github.com/ITsvetkoFF","followers_url":"https://api.github.com/users/ITsvetkoFF/followers","following_url":"https://api.github.com/users/ITsvetkoFF/following{/other_user}","gists_url":"https://api.github.com/users/ITsvetkoFF/gists{/gist_id}","starred_url":"https://api.github.com/users/ITsvetkoFF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ITsvetkoFF/subscriptions","organizations_url":"https://api.github.com/users/ITsvetkoFF/orgs","repos_url":"https://api.github.com/users/ITsvetkoFF/repos","events_url":"https://api.github.com/users/ITsvetkoFF/events{/privacy}","received_events_url":"https://api.github.com/users/ITsvetkoFF/received_events","type":"User","site_admin":false},"repo":{"id":44733682,"name":"Kv-011","full_name":"ITsvetkoFF/Kv-011","owner":{"login":"ITsvetkoFF","id":7273003,"avatar_url":"https://avatars.githubusercontent.com/u/7273003?v=3","gravatar_id":"","url":"https://api.github.com/users/ITsvetkoFF","html_url":"https://github.com/ITsvetkoFF","followers_url":"https://api.github.com/users/ITsvetkoFF/followers","following_url":"https://api.github.com/users/ITsvetkoFF/following{/other_user}","gists_url":"https://api.github.com/users/ITsvetkoFF/gists{/gist_id}","starred_url":"https://api.github.com/users/ITsvetkoFF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ITsvetkoFF/subscriptions","organizations_url":"https://api.github.com/users/ITsvetkoFF/orgs","repos_url":"https://api.github.com/users/ITsvetkoFF/repos","events_url":"https://api.github.com/users/ITsvetkoFF/events{/privacy}","received_events_url":"https://api.github.com/users/ITsvetkoFF/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ITsvetkoFF/Kv-011","description":"","fork":false,"url":"https://api.github.com/repos/ITsvetkoFF/Kv-011","forks_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/forks","keys_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/teams","hooks_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/hooks","issue_events_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/issues/events{/number}","events_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/events","assignees_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/assignees{/user}","branches_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/branches{/branch}","tags_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/tags","blobs_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/git/refs{/sha}","trees_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/statuses/{sha}","languages_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/languages","stargazers_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/stargazers","contributors_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/contributors","subscribers_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/subscribers","subscription_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/subscription","commits_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/commits{/sha}","git_commits_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/git/commits{/sha}","comments_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/comments{/number}","issue_comment_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/issues/comments{/number}","contents_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/contents/{+path}","compare_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/merges","archive_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/downloads","issues_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/issues{/number}","pulls_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls{/number}","milestones_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/milestones{/number}","notifications_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/labels{/name}","releases_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/releases{/id}","created_at":"2015-10-22T08:57:24Z","updated_at":"2015-11-10T09:50:06Z","pushed_at":"2015-12-02T22:08:21Z","git_url":"git://github.com/ITsvetkoFF/Kv-011.git","ssh_url":"git@github.com:ITsvetkoFF/Kv-011.git","clone_url":"https://github.com/ITsvetkoFF/Kv-011.git","svn_url":"https://github.com/ITsvetkoFF/Kv-011","homepage":null,"size":467,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ITsvetkoFF:master","ref":"master","sha":"d597b8cdb89737e581f2247d5d7d5b4499067d85","user":{"login":"ITsvetkoFF","id":7273003,"avatar_url":"https://avatars.githubusercontent.com/u/7273003?v=3","gravatar_id":"","url":"https://api.github.com/users/ITsvetkoFF","html_url":"https://github.com/ITsvetkoFF","followers_url":"https://api.github.com/users/ITsvetkoFF/followers","following_url":"https://api.github.com/users/ITsvetkoFF/following{/other_user}","gists_url":"https://api.github.com/users/ITsvetkoFF/gists{/gist_id}","starred_url":"https://api.github.com/users/ITsvetkoFF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ITsvetkoFF/subscriptions","organizations_url":"https://api.github.com/users/ITsvetkoFF/orgs","repos_url":"https://api.github.com/users/ITsvetkoFF/repos","events_url":"https://api.github.com/users/ITsvetkoFF/events{/privacy}","received_events_url":"https://api.github.com/users/ITsvetkoFF/received_events","type":"User","site_admin":false},"repo":{"id":44733682,"name":"Kv-011","full_name":"ITsvetkoFF/Kv-011","owner":{"login":"ITsvetkoFF","id":7273003,"avatar_url":"https://avatars.githubusercontent.com/u/7273003?v=3","gravatar_id":"","url":"https://api.github.com/users/ITsvetkoFF","html_url":"https://github.com/ITsvetkoFF","followers_url":"https://api.github.com/users/ITsvetkoFF/followers","following_url":"https://api.github.com/users/ITsvetkoFF/following{/other_user}","gists_url":"https://api.github.com/users/ITsvetkoFF/gists{/gist_id}","starred_url":"https://api.github.com/users/ITsvetkoFF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ITsvetkoFF/subscriptions","organizations_url":"https://api.github.com/users/ITsvetkoFF/orgs","repos_url":"https://api.github.com/users/ITsvetkoFF/repos","events_url":"https://api.github.com/users/ITsvetkoFF/events{/privacy}","received_events_url":"https://api.github.com/users/ITsvetkoFF/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ITsvetkoFF/Kv-011","description":"","fork":false,"url":"https://api.github.com/repos/ITsvetkoFF/Kv-011","forks_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/forks","keys_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/teams","hooks_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/hooks","issue_events_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/issues/events{/number}","events_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/events","assignees_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/assignees{/user}","branches_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/branches{/branch}","tags_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/tags","blobs_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/git/refs{/sha}","trees_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/statuses/{sha}","languages_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/languages","stargazers_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/stargazers","contributors_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/contributors","subscribers_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/subscribers","subscription_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/subscription","commits_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/commits{/sha}","git_commits_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/git/commits{/sha}","comments_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/comments{/number}","issue_comment_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/issues/comments{/number}","contents_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/contents/{+path}","compare_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/merges","archive_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/downloads","issues_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/issues{/number}","pulls_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls{/number}","milestones_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/milestones{/number}","notifications_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/labels{/name}","releases_url":"https://api.github.com/repos/ITsvetkoFF/Kv-011/releases{/id}","created_at":"2015-10-22T08:57:24Z","updated_at":"2015-11-10T09:50:06Z","pushed_at":"2015-12-02T22:08:21Z","git_url":"git://github.com/ITsvetkoFF/Kv-011.git","ssh_url":"git@github.com:ITsvetkoFF/Kv-011.git","clone_url":"https://github.com/ITsvetkoFF/Kv-011.git","svn_url":"https://github.com/ITsvetkoFF/Kv-011","homepage":null,"size":467,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls/65"},"html":{"href":"https://github.com/ITsvetkoFF/Kv-011/pull/65"},"issue":{"href":"https://api.github.com/repos/ITsvetkoFF/Kv-011/issues/65"},"comments":{"href":"https://api.github.com/repos/ITsvetkoFF/Kv-011/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ITsvetkoFF/Kv-011/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/ITsvetkoFF/Kv-011/statuses/f7eeebd8e88963d13317f879966a20b75d6859e4"}}}}