{"action":"created","comment":{"url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls/comments/65164187","id":65164187,"diff_hunk":"@@ -0,0 +1,62 @@\n+import unittest\n+from ..main.app import Amity, welcome_msg\n+import sqlite3\n+import os\n+import ipdb\n+\n+\n+class roomstest(unittest.TestCase):\n+    def setUp(self):\n+        self.amity = Amity(\"test.sqlite\")\n+\n+    def test_create_rooms(self):\n+        '''Test whether rooms are created and saved'''\n+        self.amity.create_rooms(\n+            [\"lilac\", \"Camelot\", \"Vallhalla\", \"Oculus\"], \"O\")\n+        self.amity.create_rooms([\"Php\", \"Ruby\", \"Emerald\", \"Cedar\"], \"L\")\n+        self.assertEqual(self.amity.rooms.keys(), ['L', 'O'])\n+        self.assertEqual(len(self.amity.rooms['L'].keys()), 4  )\n+        self.assertEqual(len(self.amity.rooms['O'].keys()), 4)\n+\n+\n+    def test_add_person(self):\n+        self.amity.add_person(\"Margie\", \"Rain\", \"Fellow\", \"Y\")\n+        self.amity.add_person(\"Chidi\", \"Nnadi\", \"Staff\", 'N')\n+        self.amity.add_person(\"Margie\", \"Akoth\", \"Fellow\", \"N\")\n+        self.assertEqual(len(self.amity.people['fellow to house']), 1)\n+        self.assertEqual(len(self.amity.people['staff and fellow']), 2)\n+        self.assertEqual(self.amity.rooms, {'L': {}, 'O': {}})\n+\n+\n+    def test_allocate_room(self):\n+        room_type = 'O' or 'L'\n+        self.assertEqual(len(self.amity.unallocated[room_type]), 0)\n+        self.assertEqual(self.amity.rooms, {'L': {}, 'O': {}})\n+        # ipdb.set_trace()\n+        self.assertTrue(self.amity.space.is_filled(3), False)\n+        self.assertTrue(self.amity.space.is_filled(7), True)\n+","path":"tests/testApp.py","position":38,"original_position":38,"commit_id":"4772b574df0ae62d6c3493635602c9bcd4763bd4","original_commit_id":"4772b574df0ae62d6c3493635602c9bcd4763bd4","user":{"login":"andela-cnnadi","id":3100850,"avatar_url":"https://avatars.githubusercontent.com/u/3100850?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-cnnadi","html_url":"https://github.com/andela-cnnadi","followers_url":"https://api.github.com/users/andela-cnnadi/followers","following_url":"https://api.github.com/users/andela-cnnadi/following{/other_user}","gists_url":"https://api.github.com/users/andela-cnnadi/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-cnnadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-cnnadi/subscriptions","organizations_url":"https://api.github.com/users/andela-cnnadi/orgs","repos_url":"https://api.github.com/users/andela-cnnadi/repos","events_url":"https://api.github.com/users/andela-cnnadi/events{/privacy}","received_events_url":"https://api.github.com/users/andela-cnnadi/received_events","type":"User","site_admin":false},"body":"**Code Quality: Nitpick**\r\n\r\nWhy all these free spaces though.","created_at":"2016-05-31T11:23:34Z","updated_at":"2016-05-31T11:23:34Z","html_url":"https://github.com/andela-mochieng/Amity_room_allocation/pull/2#discussion_r65164187","pull_request_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls/comments/65164187"},"html":{"href":"https://github.com/andela-mochieng/Amity_room_allocation/pull/2#discussion_r65164187"},"pull_request":{"href":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls/2","id":71835842,"html_url":"https://github.com/andela-mochieng/Amity_room_allocation/pull/2","diff_url":"https://github.com/andela-mochieng/Amity_room_allocation/pull/2.diff","patch_url":"https://github.com/andela-mochieng/Amity_room_allocation/pull/2.patch","issue_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/issues/2","number":2,"state":"open","locked":false,"title":"New develop","user":{"login":"andela-mochieng","id":12407721,"avatar_url":"https://avatars.githubusercontent.com/u/12407721?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-mochieng","html_url":"https://github.com/andela-mochieng","followers_url":"https://api.github.com/users/andela-mochieng/followers","following_url":"https://api.github.com/users/andela-mochieng/following{/other_user}","gists_url":"https://api.github.com/users/andela-mochieng/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-mochieng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-mochieng/subscriptions","organizations_url":"https://api.github.com/users/andela-mochieng/orgs","repos_url":"https://api.github.com/users/andela-mochieng/repos","events_url":"https://api.github.com/users/andela-mochieng/events{/privacy}","received_events_url":"https://api.github.com/users/andela-mochieng/received_events","type":"User","site_admin":false},"body":"Correcting code functionality","created_at":"2016-05-29T19:52:27Z","updated_at":"2016-05-31T11:23:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d7ecbea404e8e423d5bca5300afd6a0ae85c4a2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls/2/commits","review_comments_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls/2/comments","review_comment_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/issues/2/comments","statuses_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/statuses/4772b574df0ae62d6c3493635602c9bcd4763bd4","head":{"label":"andela-mochieng:new_develop","ref":"new_develop","sha":"4772b574df0ae62d6c3493635602c9bcd4763bd4","user":{"login":"andela-mochieng","id":12407721,"avatar_url":"https://avatars.githubusercontent.com/u/12407721?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-mochieng","html_url":"https://github.com/andela-mochieng","followers_url":"https://api.github.com/users/andela-mochieng/followers","following_url":"https://api.github.com/users/andela-mochieng/following{/other_user}","gists_url":"https://api.github.com/users/andela-mochieng/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-mochieng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-mochieng/subscriptions","organizations_url":"https://api.github.com/users/andela-mochieng/orgs","repos_url":"https://api.github.com/users/andela-mochieng/repos","events_url":"https://api.github.com/users/andela-mochieng/events{/privacy}","received_events_url":"https://api.github.com/users/andela-mochieng/received_events","type":"User","site_admin":false},"repo":{"id":56297702,"name":"Amity_room_allocation","full_name":"andela-mochieng/Amity_room_allocation","owner":{"login":"andela-mochieng","id":12407721,"avatar_url":"https://avatars.githubusercontent.com/u/12407721?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-mochieng","html_url":"https://github.com/andela-mochieng","followers_url":"https://api.github.com/users/andela-mochieng/followers","following_url":"https://api.github.com/users/andela-mochieng/following{/other_user}","gists_url":"https://api.github.com/users/andela-mochieng/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-mochieng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-mochieng/subscriptions","organizations_url":"https://api.github.com/users/andela-mochieng/orgs","repos_url":"https://api.github.com/users/andela-mochieng/repos","events_url":"https://api.github.com/users/andela-mochieng/events{/privacy}","received_events_url":"https://api.github.com/users/andela-mochieng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-mochieng/Amity_room_allocation","description":"Checkpoint 1 application that allocated Andela Staff Oficces and living spaces.","fork":false,"url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation","forks_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/forks","keys_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/teams","hooks_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/hooks","issue_events_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/issues/events{/number}","events_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/events","assignees_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/assignees{/user}","branches_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/branches{/branch}","tags_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/tags","blobs_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/languages","stargazers_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/stargazers","contributors_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/contributors","subscribers_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/subscribers","subscription_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/subscription","commits_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/contents/{+path}","compare_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/merges","archive_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/downloads","issues_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/issues{/number}","pulls_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/labels{/name}","releases_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/releases{/id}","deployments_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/deployments","created_at":"2016-04-15T06:46:49Z","updated_at":"2016-05-24T15:41:03Z","pushed_at":"2016-05-29T19:52:27Z","git_url":"git://github.com/andela-mochieng/Amity_room_allocation.git","ssh_url":"git@github.com:andela-mochieng/Amity_room_allocation.git","clone_url":"https://github.com/andela-mochieng/Amity_room_allocation.git","svn_url":"https://github.com/andela-mochieng/Amity_room_allocation","homepage":"","size":159,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"andela-mochieng:master","ref":"master","sha":"c7af2f82945d1d9e6c924b9cb4511b8ee7455af6","user":{"login":"andela-mochieng","id":12407721,"avatar_url":"https://avatars.githubusercontent.com/u/12407721?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-mochieng","html_url":"https://github.com/andela-mochieng","followers_url":"https://api.github.com/users/andela-mochieng/followers","following_url":"https://api.github.com/users/andela-mochieng/following{/other_user}","gists_url":"https://api.github.com/users/andela-mochieng/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-mochieng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-mochieng/subscriptions","organizations_url":"https://api.github.com/users/andela-mochieng/orgs","repos_url":"https://api.github.com/users/andela-mochieng/repos","events_url":"https://api.github.com/users/andela-mochieng/events{/privacy}","received_events_url":"https://api.github.com/users/andela-mochieng/received_events","type":"User","site_admin":false},"repo":{"id":56297702,"name":"Amity_room_allocation","full_name":"andela-mochieng/Amity_room_allocation","owner":{"login":"andela-mochieng","id":12407721,"avatar_url":"https://avatars.githubusercontent.com/u/12407721?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-mochieng","html_url":"https://github.com/andela-mochieng","followers_url":"https://api.github.com/users/andela-mochieng/followers","following_url":"https://api.github.com/users/andela-mochieng/following{/other_user}","gists_url":"https://api.github.com/users/andela-mochieng/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-mochieng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-mochieng/subscriptions","organizations_url":"https://api.github.com/users/andela-mochieng/orgs","repos_url":"https://api.github.com/users/andela-mochieng/repos","events_url":"https://api.github.com/users/andela-mochieng/events{/privacy}","received_events_url":"https://api.github.com/users/andela-mochieng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-mochieng/Amity_room_allocation","description":"Checkpoint 1 application that allocated Andela Staff Oficces and living spaces.","fork":false,"url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation","forks_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/forks","keys_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/teams","hooks_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/hooks","issue_events_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/issues/events{/number}","events_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/events","assignees_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/assignees{/user}","branches_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/branches{/branch}","tags_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/tags","blobs_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/languages","stargazers_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/stargazers","contributors_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/contributors","subscribers_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/subscribers","subscription_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/subscription","commits_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/contents/{+path}","compare_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/merges","archive_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/downloads","issues_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/issues{/number}","pulls_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/labels{/name}","releases_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/releases{/id}","deployments_url":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/deployments","created_at":"2016-04-15T06:46:49Z","updated_at":"2016-05-24T15:41:03Z","pushed_at":"2016-05-29T19:52:27Z","git_url":"git://github.com/andela-mochieng/Amity_room_allocation.git","ssh_url":"git@github.com:andela-mochieng/Amity_room_allocation.git","clone_url":"https://github.com/andela-mochieng/Amity_room_allocation.git","svn_url":"https://github.com/andela-mochieng/Amity_room_allocation","homepage":"","size":159,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls/2"},"html":{"href":"https://github.com/andela-mochieng/Amity_room_allocation/pull/2"},"issue":{"href":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/issues/2"},"comments":{"href":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/andela-mochieng/Amity_room_allocation/statuses/4772b574df0ae62d6c3493635602c9bcd4763bd4"}}}}
{"actor":{"display_login":"andela-cnnadi"}}