{"action":"created","comment":{"url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls/comments/117641759","pull_request_review_id":39364601,"id":117641759,"diff_hunk":"@@ -1,2 +1,51 @@\n-class SaveState():\n-    pass\n+\n+import os\n+import unittest\n+\n+from models import model\n+\n+\n+class SaveStateTestCase(unittest.TestCase):\n+    \"\"\"\n+    Testing strategy\n+    partitions:\n+        input: default, abitray string, non-string\n+        special case: DB already exists, over write existing db\n+\n+        This should cover the full catersian\n+    \"\"\"\n+    dojo = model.Dojo(\"AndelaKenya_test\")\n+    def setUp(self):\n+        self.dojo = SaveStateTestCase.dojo\n+        self.office = model.Office('new_office')\n+        self.livingspace = model.LivingSpace('new_livingspace')\n+        self.dojo.add_office(self.office)\n+        self.dojo.add_livingspace(self.livingspace)\n+\n+        self.fellow = model.Fellow(\"new_fellow\")\n+        self.staff = model.Staff(\"new_staff\")\n+        self.dojo.add_fellow(self.fellow)\n+        self.dojo.add_staff(self.staff)\n+\n+    def test_creates_databse_with_abitaryname(self):\n+        self.dojo.save_state(\"sqlite.db\")\n+        self.assertTrue(os.path.exists(\"./db/sqlite.db\"))\n+\n+    def test_create_db_without_args(self):\n+        self.dojo.save_state()\n+        self.assertTrue(os.path.exists(\"./db/default.db\"))\n+\n+    def test_throw_update_error_if_exists(self):","path":"tests/test_save_state.py","position":40,"original_position":40,"commit_id":"d274cf587009b8b3aa70c126d4cdbef7b9b16ac5","original_commit_id":"d274cf587009b8b3aa70c126d4cdbef7b9b16ac5","user":{"login":"georgreen","id":17669596,"avatar_url":"https://avatars2.githubusercontent.com/u/17669596?v=3","gravatar_id":"","url":"https://api.github.com/users/georgreen","html_url":"https://github.com/georgreen","followers_url":"https://api.github.com/users/georgreen/followers","following_url":"https://api.github.com/users/georgreen/following{/other_user}","gists_url":"https://api.github.com/users/georgreen/gists{/gist_id}","starred_url":"https://api.github.com/users/georgreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgreen/subscriptions","organizations_url":"https://api.github.com/users/georgreen/orgs","repos_url":"https://api.github.com/users/georgreen/repos","events_url":"https://api.github.com/users/georgreen/events{/privacy}","received_events_url":"https://api.github.com/users/georgreen/received_events","type":"User","site_admin":false},"body":"I did this to give the user an option to update data in a DB or overwrite the DB, and the way I intend to implement this is by throwing an update exception if DB already exists, then I handle the exception by prompting the user if they want to overwrite or simply update.","created_at":"2017-05-21T20:21:39Z","updated_at":"2017-05-21T20:21:39Z","html_url":"https://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project/pull/25#discussion_r117641759","pull_request_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls/comments/117641759"},"html":{"href":"https://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project/pull/25#discussion_r117641759"},"pull_request":{"href":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls/25","id":121360079,"html_url":"https://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project/pull/25","diff_url":"https://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project/pull/25.diff","patch_url":"https://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project/pull/25.patch","issue_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/issues/25","number":25,"state":"open","locked":false,"title":" Test load and save Feature","user":{"login":"georgreen","id":17669596,"avatar_url":"https://avatars2.githubusercontent.com/u/17669596?v=3","gravatar_id":"","url":"https://api.github.com/users/georgreen","html_url":"https://github.com/georgreen","followers_url":"https://api.github.com/users/georgreen/followers","following_url":"https://api.github.com/users/georgreen/following{/other_user}","gists_url":"https://api.github.com/users/georgreen/gists{/gist_id}","starred_url":"https://api.github.com/users/georgreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgreen/subscriptions","organizations_url":"https://api.github.com/users/georgreen/orgs","repos_url":"https://api.github.com/users/georgreen/repos","events_url":"https://api.github.com/users/georgreen/events{/privacy}","received_events_url":"https://api.github.com/users/georgreen/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-05-18T19:31:59Z","updated_at":"2017-05-21T20:21:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"70de25492eb5688304f40e7b749b5d3420448ff5","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls/25/commits","review_comments_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls/25/comments","review_comment_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/issues/25/comments","statuses_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/statuses/d274cf587009b8b3aa70c126d4cdbef7b9b16ac5","head":{"label":"georgreen:ft-test-load-save","ref":"ft-test-load-save","sha":"d274cf587009b8b3aa70c126d4cdbef7b9b16ac5","user":{"login":"georgreen","id":17669596,"avatar_url":"https://avatars2.githubusercontent.com/u/17669596?v=3","gravatar_id":"","url":"https://api.github.com/users/georgreen","html_url":"https://github.com/georgreen","followers_url":"https://api.github.com/users/georgreen/followers","following_url":"https://api.github.com/users/georgreen/following{/other_user}","gists_url":"https://api.github.com/users/georgreen/gists{/gist_id}","starred_url":"https://api.github.com/users/georgreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgreen/subscriptions","organizations_url":"https://api.github.com/users/georgreen/orgs","repos_url":"https://api.github.com/users/georgreen/repos","events_url":"https://api.github.com/users/georgreen/events{/privacy}","received_events_url":"https://api.github.com/users/georgreen/received_events","type":"User","site_admin":false},"repo":{"id":87767242,"name":"Geoogreen-Mamboleo-Dojo-Project","full_name":"georgreen/Geoogreen-Mamboleo-Dojo-Project","owner":{"login":"georgreen","id":17669596,"avatar_url":"https://avatars2.githubusercontent.com/u/17669596?v=3","gravatar_id":"","url":"https://api.github.com/users/georgreen","html_url":"https://github.com/georgreen","followers_url":"https://api.github.com/users/georgreen/followers","following_url":"https://api.github.com/users/georgreen/following{/other_user}","gists_url":"https://api.github.com/users/georgreen/gists{/gist_id}","starred_url":"https://api.github.com/users/georgreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgreen/subscriptions","organizations_url":"https://api.github.com/users/georgreen/orgs","repos_url":"https://api.github.com/users/georgreen/repos","events_url":"https://api.github.com/users/georgreen/events{/privacy}","received_events_url":"https://api.github.com/users/georgreen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project","description":"Office Space Allocation System","fork":false,"url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project","forks_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/forks","keys_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/teams","hooks_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/hooks","issue_events_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/issues/events{/number}","events_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/events","assignees_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/assignees{/user}","branches_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/branches{/branch}","tags_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/tags","blobs_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/git/refs{/sha}","trees_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/statuses/{sha}","languages_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/languages","stargazers_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/stargazers","contributors_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/contributors","subscribers_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/subscribers","subscription_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/subscription","commits_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/commits{/sha}","git_commits_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/git/commits{/sha}","comments_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/comments{/number}","issue_comment_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/issues/comments{/number}","contents_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/contents/{+path}","compare_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/merges","archive_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/downloads","issues_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/issues{/number}","pulls_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls{/number}","milestones_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/milestones{/number}","notifications_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/labels{/name}","releases_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/releases{/id}","deployments_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/deployments","created_at":"2017-04-10T04:41:09Z","updated_at":"2017-04-13T05:37:46Z","pushed_at":"2017-05-19T14:01:58Z","git_url":"git://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project.git","ssh_url":"git@github.com:georgreen/Geoogreen-Mamboleo-Dojo-Project.git","clone_url":"https://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project.git","svn_url":"https://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project","homepage":null,"size":339,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"georgreen:development","ref":"development","sha":"dd495d765b7e8a96fa325fb116c8a450f08e88ba","user":{"login":"georgreen","id":17669596,"avatar_url":"https://avatars2.githubusercontent.com/u/17669596?v=3","gravatar_id":"","url":"https://api.github.com/users/georgreen","html_url":"https://github.com/georgreen","followers_url":"https://api.github.com/users/georgreen/followers","following_url":"https://api.github.com/users/georgreen/following{/other_user}","gists_url":"https://api.github.com/users/georgreen/gists{/gist_id}","starred_url":"https://api.github.com/users/georgreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgreen/subscriptions","organizations_url":"https://api.github.com/users/georgreen/orgs","repos_url":"https://api.github.com/users/georgreen/repos","events_url":"https://api.github.com/users/georgreen/events{/privacy}","received_events_url":"https://api.github.com/users/georgreen/received_events","type":"User","site_admin":false},"repo":{"id":87767242,"name":"Geoogreen-Mamboleo-Dojo-Project","full_name":"georgreen/Geoogreen-Mamboleo-Dojo-Project","owner":{"login":"georgreen","id":17669596,"avatar_url":"https://avatars2.githubusercontent.com/u/17669596?v=3","gravatar_id":"","url":"https://api.github.com/users/georgreen","html_url":"https://github.com/georgreen","followers_url":"https://api.github.com/users/georgreen/followers","following_url":"https://api.github.com/users/georgreen/following{/other_user}","gists_url":"https://api.github.com/users/georgreen/gists{/gist_id}","starred_url":"https://api.github.com/users/georgreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgreen/subscriptions","organizations_url":"https://api.github.com/users/georgreen/orgs","repos_url":"https://api.github.com/users/georgreen/repos","events_url":"https://api.github.com/users/georgreen/events{/privacy}","received_events_url":"https://api.github.com/users/georgreen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project","description":"Office Space Allocation System","fork":false,"url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project","forks_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/forks","keys_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/teams","hooks_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/hooks","issue_events_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/issues/events{/number}","events_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/events","assignees_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/assignees{/user}","branches_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/branches{/branch}","tags_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/tags","blobs_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/git/refs{/sha}","trees_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/statuses/{sha}","languages_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/languages","stargazers_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/stargazers","contributors_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/contributors","subscribers_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/subscribers","subscription_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/subscription","commits_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/commits{/sha}","git_commits_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/git/commits{/sha}","comments_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/comments{/number}","issue_comment_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/issues/comments{/number}","contents_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/contents/{+path}","compare_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/merges","archive_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/downloads","issues_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/issues{/number}","pulls_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls{/number}","milestones_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/milestones{/number}","notifications_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/labels{/name}","releases_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/releases{/id}","deployments_url":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/deployments","created_at":"2017-04-10T04:41:09Z","updated_at":"2017-04-13T05:37:46Z","pushed_at":"2017-05-19T14:01:58Z","git_url":"git://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project.git","ssh_url":"git@github.com:georgreen/Geoogreen-Mamboleo-Dojo-Project.git","clone_url":"https://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project.git","svn_url":"https://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project","homepage":null,"size":339,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls/25"},"html":{"href":"https://github.com/georgreen/Geoogreen-Mamboleo-Dojo-Project/pull/25"},"issue":{"href":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/issues/25"},"comments":{"href":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/georgreen/Geoogreen-Mamboleo-Dojo-Project/statuses/d274cf587009b8b3aa70c126d4cdbef7b9b16ac5"}}}}
{"actor":{"display_login":"georgreen"}}