{"action":"created","comment":{"url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls/comments/231719661","pull_request_review_id":172749291,"id":231719661,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTcxOTY2MQ==","diff_hunk":"@@ -93,3 +93,42 @@ def test_3_time_string_conversion(time_record_factory):\n         f'{t.time_end:%I:%M %p} on {t.time_start:%m/%d/%Y}.'\n     )\n     assert str(t) == expected\n+\n+\n+def test_total_time_no_end_time(time_record_factory):\n+    \"\"\"\n+    Case with no end time\n+    \"\"\"\n+    d = datetime.datetime(2018, 10, 1, 15, 26)\n+    t = time_record_factory(time_start=d, time_end=None)\n+    expected = None\n+    assert t.total_time == expected\n+\n+\n+def test_total_time_with_start_and_end_times(time_record_factory):\n+    \"\"\"\n+    Case with start and end times. Same day, 9-5 workday\n+    \"\"\"\n+    ts = datetime.datetime(2018, 10, 1, 9, 0)\n+    te = datetime.datetime(2018, 10, 1, 17, 0)\n+\n+    t = time_record_factory(time_start=ts, time_end=te)\n+\n+    expected = float(8.0)\n+\n+    assert t.total_time == expected\n+\n+\n+def test_total_time_rounding_start_and_end_time(time_record_factory):\n+    \"\"\"\n+    Case with start and end times. Same day, 9-5 workday\n+    \"\"\"\n+    ts = datetime.datetime(2018, 10, 1, 9, 0)\n+    te = datetime.datetime(2018, 10, 1, 17, 59)\n+\n+    t = time_record_factory(time_start=ts, time_end=te)\n+    # round to 17.5 - 9 = 8.5\n+    expected = float(8.5)","path":"timetracker/vms/test/models/test_time_record_model.py","position":39,"original_position":39,"commit_id":"6a79b05cc6ad8b0eb34c0c8fccf127cfef019990","original_commit_id":"6a79b05cc6ad8b0eb34c0c8fccf127cfef019990","user":{"login":"cdriehuys","id":4708504,"node_id":"MDQ6VXNlcjQ3MDg1MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/4708504?v=4","gravatar_id":"","url":"https://api.github.com/users/cdriehuys","html_url":"https://github.com/cdriehuys","followers_url":"https://api.github.com/users/cdriehuys/followers","following_url":"https://api.github.com/users/cdriehuys/following{/other_user}","gists_url":"https://api.github.com/users/cdriehuys/gists{/gist_id}","starred_url":"https://api.github.com/users/cdriehuys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdriehuys/subscriptions","organizations_url":"https://api.github.com/users/cdriehuys/orgs","repos_url":"https://api.github.com/users/cdriehuys/repos","events_url":"https://api.github.com/users/cdriehuys/events{/privacy}","received_events_url":"https://api.github.com/users/cdriehuys/received_events","type":"User","site_admin":false},"body":"There's no need for a `float` cast here.\r\n\r\n```suggestion\r\n    expected = 8.5\r\n```","created_at":"2018-11-07T23:39:28Z","updated_at":"2018-11-07T23:42:54Z","html_url":"https://github.com/comp523-jarvis/timetracker-web/pull/68#discussion_r231719661","pull_request_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls/68","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls/comments/231719661"},"html":{"href":"https://github.com/comp523-jarvis/timetracker-web/pull/68#discussion_r231719661"},"pull_request":{"href":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls/68"}}},"pull_request":{"url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls/68","id":229125345,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5MTI1MzQ1","html_url":"https://github.com/comp523-jarvis/timetracker-web/pull/68","diff_url":"https://github.com/comp523-jarvis/timetracker-web/pull/68.diff","patch_url":"https://github.com/comp523-jarvis/timetracker-web/pull/68.patch","issue_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/issues/68","number":68,"state":"open","locked":false,"title":"Employee pay rate","user":{"login":"elijahlong5","id":31546914,"node_id":"MDQ6VXNlcjMxNTQ2OTE0","avatar_url":"https://avatars1.githubusercontent.com/u/31546914?v=4","gravatar_id":"","url":"https://api.github.com/users/elijahlong5","html_url":"https://github.com/elijahlong5","followers_url":"https://api.github.com/users/elijahlong5/followers","following_url":"https://api.github.com/users/elijahlong5/following{/other_user}","gists_url":"https://api.github.com/users/elijahlong5/gists{/gist_id}","starred_url":"https://api.github.com/users/elijahlong5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elijahlong5/subscriptions","organizations_url":"https://api.github.com/users/elijahlong5/orgs","repos_url":"https://api.github.com/users/elijahlong5/repos","events_url":"https://api.github.com/users/elijahlong5/events{/privacy}","received_events_url":"https://api.github.com/users/elijahlong5/received_events","type":"User","site_admin":false},"body":"closes #67 ","created_at":"2018-11-07T18:27:50Z","updated_at":"2018-11-07T23:42:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls/68/commits","review_comments_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls/68/comments","review_comment_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/issues/68/comments","statuses_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/statuses/6a79b05cc6ad8b0eb34c0c8fccf127cfef019990","head":{"label":"comp523-jarvis:employee-pay-rate","ref":"employee-pay-rate","sha":"6a79b05cc6ad8b0eb34c0c8fccf127cfef019990","user":{"login":"comp523-jarvis","id":43618171,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNjE4MTcx","avatar_url":"https://avatars3.githubusercontent.com/u/43618171?v=4","gravatar_id":"","url":"https://api.github.com/users/comp523-jarvis","html_url":"https://github.com/comp523-jarvis","followers_url":"https://api.github.com/users/comp523-jarvis/followers","following_url":"https://api.github.com/users/comp523-jarvis/following{/other_user}","gists_url":"https://api.github.com/users/comp523-jarvis/gists{/gist_id}","starred_url":"https://api.github.com/users/comp523-jarvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/comp523-jarvis/subscriptions","organizations_url":"https://api.github.com/users/comp523-jarvis/orgs","repos_url":"https://api.github.com/users/comp523-jarvis/repos","events_url":"https://api.github.com/users/comp523-jarvis/events{/privacy}","received_events_url":"https://api.github.com/users/comp523-jarvis/received_events","type":"Organization","site_admin":false},"repo":{"id":151492260,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE0OTIyNjA=","name":"timetracker-web","full_name":"comp523-jarvis/timetracker-web","private":false,"owner":{"login":"comp523-jarvis","id":43618171,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNjE4MTcx","avatar_url":"https://avatars3.githubusercontent.com/u/43618171?v=4","gravatar_id":"","url":"https://api.github.com/users/comp523-jarvis","html_url":"https://github.com/comp523-jarvis","followers_url":"https://api.github.com/users/comp523-jarvis/followers","following_url":"https://api.github.com/users/comp523-jarvis/following{/other_user}","gists_url":"https://api.github.com/users/comp523-jarvis/gists{/gist_id}","starred_url":"https://api.github.com/users/comp523-jarvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/comp523-jarvis/subscriptions","organizations_url":"https://api.github.com/users/comp523-jarvis/orgs","repos_url":"https://api.github.com/users/comp523-jarvis/repos","events_url":"https://api.github.com/users/comp523-jarvis/events{/privacy}","received_events_url":"https://api.github.com/users/comp523-jarvis/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/comp523-jarvis/timetracker-web","description":"Web app and API for Ulimi time tracker","fork":false,"url":"https://api.github.com/repos/comp523-jarvis/timetracker-web","forks_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/forks","keys_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/teams","hooks_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/hooks","issue_events_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/issues/events{/number}","events_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/events","assignees_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/assignees{/user}","branches_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/branches{/branch}","tags_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/tags","blobs_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/statuses/{sha}","languages_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/languages","stargazers_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/stargazers","contributors_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/contributors","subscribers_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/subscribers","subscription_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/subscription","commits_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/contents/{+path}","compare_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/merges","archive_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/downloads","issues_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/issues{/number}","pulls_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls{/number}","milestones_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/milestones{/number}","notifications_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/labels{/name}","releases_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/releases{/id}","deployments_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/deployments","created_at":"2018-10-03T23:10:12Z","updated_at":"2018-11-07T21:55:47Z","pushed_at":"2018-11-07T21:55:52Z","git_url":"git://github.com/comp523-jarvis/timetracker-web.git","ssh_url":"git@github.com:comp523-jarvis/timetracker-web.git","clone_url":"https://github.com/comp523-jarvis/timetracker-web.git","svn_url":"https://github.com/comp523-jarvis/timetracker-web","homepage":null,"size":709,"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,"archived":false,"open_issues_count":16,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":16,"watchers":0,"default_branch":"master"}},"base":{"label":"comp523-jarvis:master","ref":"master","sha":"0feb1971d07e3bd2597b439a06c89be2904a577c","user":{"login":"comp523-jarvis","id":43618171,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNjE4MTcx","avatar_url":"https://avatars3.githubusercontent.com/u/43618171?v=4","gravatar_id":"","url":"https://api.github.com/users/comp523-jarvis","html_url":"https://github.com/comp523-jarvis","followers_url":"https://api.github.com/users/comp523-jarvis/followers","following_url":"https://api.github.com/users/comp523-jarvis/following{/other_user}","gists_url":"https://api.github.com/users/comp523-jarvis/gists{/gist_id}","starred_url":"https://api.github.com/users/comp523-jarvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/comp523-jarvis/subscriptions","organizations_url":"https://api.github.com/users/comp523-jarvis/orgs","repos_url":"https://api.github.com/users/comp523-jarvis/repos","events_url":"https://api.github.com/users/comp523-jarvis/events{/privacy}","received_events_url":"https://api.github.com/users/comp523-jarvis/received_events","type":"Organization","site_admin":false},"repo":{"id":151492260,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE0OTIyNjA=","name":"timetracker-web","full_name":"comp523-jarvis/timetracker-web","private":false,"owner":{"login":"comp523-jarvis","id":43618171,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNjE4MTcx","avatar_url":"https://avatars3.githubusercontent.com/u/43618171?v=4","gravatar_id":"","url":"https://api.github.com/users/comp523-jarvis","html_url":"https://github.com/comp523-jarvis","followers_url":"https://api.github.com/users/comp523-jarvis/followers","following_url":"https://api.github.com/users/comp523-jarvis/following{/other_user}","gists_url":"https://api.github.com/users/comp523-jarvis/gists{/gist_id}","starred_url":"https://api.github.com/users/comp523-jarvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/comp523-jarvis/subscriptions","organizations_url":"https://api.github.com/users/comp523-jarvis/orgs","repos_url":"https://api.github.com/users/comp523-jarvis/repos","events_url":"https://api.github.com/users/comp523-jarvis/events{/privacy}","received_events_url":"https://api.github.com/users/comp523-jarvis/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/comp523-jarvis/timetracker-web","description":"Web app and API for Ulimi time tracker","fork":false,"url":"https://api.github.com/repos/comp523-jarvis/timetracker-web","forks_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/forks","keys_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/teams","hooks_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/hooks","issue_events_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/issues/events{/number}","events_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/events","assignees_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/assignees{/user}","branches_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/branches{/branch}","tags_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/tags","blobs_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/statuses/{sha}","languages_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/languages","stargazers_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/stargazers","contributors_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/contributors","subscribers_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/subscribers","subscription_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/subscription","commits_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/contents/{+path}","compare_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/merges","archive_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/downloads","issues_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/issues{/number}","pulls_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls{/number}","milestones_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/milestones{/number}","notifications_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/labels{/name}","releases_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/releases{/id}","deployments_url":"https://api.github.com/repos/comp523-jarvis/timetracker-web/deployments","created_at":"2018-10-03T23:10:12Z","updated_at":"2018-11-07T21:55:47Z","pushed_at":"2018-11-07T21:55:52Z","git_url":"git://github.com/comp523-jarvis/timetracker-web.git","ssh_url":"git@github.com:comp523-jarvis/timetracker-web.git","clone_url":"https://github.com/comp523-jarvis/timetracker-web.git","svn_url":"https://github.com/comp523-jarvis/timetracker-web","homepage":null,"size":709,"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,"archived":false,"open_issues_count":16,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":16,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls/68"},"html":{"href":"https://github.com/comp523-jarvis/timetracker-web/pull/68"},"issue":{"href":"https://api.github.com/repos/comp523-jarvis/timetracker-web/issues/68"},"comments":{"href":"https://api.github.com/repos/comp523-jarvis/timetracker-web/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/comp523-jarvis/timetracker-web/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/comp523-jarvis/timetracker-web/statuses/6a79b05cc6ad8b0eb34c0c8fccf127cfef019990"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cdriehuys"}}