{"action":"created","comment":{"url":"https://api.github.com/repos/teamtaverna/core/pulls/comments/81121140","pull_request_review_id":2122449,"id":81121140,"diff_hunk":"@@ -235,3 +237,62 @@ def test_zero_cycle_day_value_cannot_be_saved(self):\n             timetable=self.timetable_object)\n \n         self.assertRaises(ValidationError, menu_item_three.save)\n+\n+\n+class EventTest(TestCase):\n+    \"\"\"Tests the Event model.\"\"\"\n+\n+    def setUp(self):\n+        self.future_date = datetime.strptime('07 08 2016 05 30', '%d %m %Y %H %M')\n+        self.earlier_date = datetime.strptime('06 07 2016 05 30', '%d %m %Y %H %M')\n+        self.timetable = Timetable.objects.create(\n+            name='timtable-item',\n+            code='FBI23212',\n+            api_key='419223',\n+            cycle_length=14,\n+            current_cycle_day=2,\n+            date_created=self.earlier_date,\n+            date_modified=self.future_date\n+        )\n+\n+    def test_event_create(self):\n+        Event.objects.create(\n+            name='some event',\n+            timetable=self.timetable,\n+            start_date=self.earlier_date,\n+            end_date=self.future_date,\n+        )\n+        evt = Event.objects.get(timetable=self.timetable)\n+        self.assertEqual(evt.timetable.id, self.timetable.id)\n+\n+    def test_event_end_time_less_than_start_time_cannot_be_saved(self):\n+        evt = Event(","path":"app/timetables/tests/test_models.py","position":48,"original_position":48,"commit_id":"14edfb6bcaafb8b79735d25642bf2236cfe5dac7","original_commit_id":"14edfb6bcaafb8b79735d25642bf2236cfe5dac7","user":{"login":"andela-ooshodi","id":13224175,"avatar_url":"https://avatars.githubusercontent.com/u/13224175?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-ooshodi","html_url":"https://github.com/andela-ooshodi","followers_url":"https://api.github.com/users/andela-ooshodi/followers","following_url":"https://api.github.com/users/andela-ooshodi/following{/other_user}","gists_url":"https://api.github.com/users/andela-ooshodi/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-ooshodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-ooshodi/subscriptions","organizations_url":"https://api.github.com/users/andela-ooshodi/orgs","repos_url":"https://api.github.com/users/andela-ooshodi/repos","events_url":"https://api.github.com/users/andela-ooshodi/events{/privacy}","received_events_url":"https://api.github.com/users/andela-ooshodi/received_events","type":"User","site_admin":false},"body":"same here `event` instead of `evt`","created_at":"2016-09-29T12:04:56Z","updated_at":"2016-09-29T12:04:56Z","html_url":"https://github.com/teamtaverna/core/pull/76#discussion_r81121140","pull_request_url":"https://api.github.com/repos/teamtaverna/core/pulls/76","_links":{"self":{"href":"https://api.github.com/repos/teamtaverna/core/pulls/comments/81121140"},"html":{"href":"https://github.com/teamtaverna/core/pull/76#discussion_r81121140"},"pull_request":{"href":"https://api.github.com/repos/teamtaverna/core/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/teamtaverna/core/pulls/76","id":86402480,"html_url":"https://github.com/teamtaverna/core/pull/76","diff_url":"https://github.com/teamtaverna/core/pull/76.diff","patch_url":"https://github.com/teamtaverna/core/pull/76.patch","issue_url":"https://api.github.com/repos/teamtaverna/core/issues/76","number":76,"state":"open","locked":false,"title":"32  Create event table","user":{"login":"andela-snwuguru","id":18328313,"avatar_url":"https://avatars.githubusercontent.com/u/18328313?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-snwuguru","html_url":"https://github.com/andela-snwuguru","followers_url":"https://api.github.com/users/andela-snwuguru/followers","following_url":"https://api.github.com/users/andela-snwuguru/following{/other_user}","gists_url":"https://api.github.com/users/andela-snwuguru/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-snwuguru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-snwuguru/subscriptions","organizations_url":"https://api.github.com/users/andela-snwuguru/orgs","repos_url":"https://api.github.com/users/andela-snwuguru/repos","events_url":"https://api.github.com/users/andela-snwuguru/events{/privacy}","received_events_url":"https://api.github.com/users/andela-snwuguru/received_events","type":"User","site_admin":false},"body":"#32 \r\n\r\nCreate event model and register it in Django admin.","created_at":"2016-09-22T19:49:49Z","updated_at":"2016-09-29T12:07:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d5b3d8c8aeed6e2e844f801d9440f8113765ee4","assignee":{"login":"andela-snwuguru","id":18328313,"avatar_url":"https://avatars.githubusercontent.com/u/18328313?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-snwuguru","html_url":"https://github.com/andela-snwuguru","followers_url":"https://api.github.com/users/andela-snwuguru/followers","following_url":"https://api.github.com/users/andela-snwuguru/following{/other_user}","gists_url":"https://api.github.com/users/andela-snwuguru/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-snwuguru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-snwuguru/subscriptions","organizations_url":"https://api.github.com/users/andela-snwuguru/orgs","repos_url":"https://api.github.com/users/andela-snwuguru/repos","events_url":"https://api.github.com/users/andela-snwuguru/events{/privacy}","received_events_url":"https://api.github.com/users/andela-snwuguru/received_events","type":"User","site_admin":false},"assignees":[{"login":"andela-snwuguru","id":18328313,"avatar_url":"https://avatars.githubusercontent.com/u/18328313?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-snwuguru","html_url":"https://github.com/andela-snwuguru","followers_url":"https://api.github.com/users/andela-snwuguru/followers","following_url":"https://api.github.com/users/andela-snwuguru/following{/other_user}","gists_url":"https://api.github.com/users/andela-snwuguru/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-snwuguru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-snwuguru/subscriptions","organizations_url":"https://api.github.com/users/andela-snwuguru/orgs","repos_url":"https://api.github.com/users/andela-snwuguru/repos","events_url":"https://api.github.com/users/andela-snwuguru/events{/privacy}","received_events_url":"https://api.github.com/users/andela-snwuguru/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/teamtaverna/core/pulls/76/commits","review_comments_url":"https://api.github.com/repos/teamtaverna/core/pulls/76/comments","review_comment_url":"https://api.github.com/repos/teamtaverna/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/teamtaverna/core/issues/76/comments","statuses_url":"https://api.github.com/repos/teamtaverna/core/statuses/14edfb6bcaafb8b79735d25642bf2236cfe5dac7","head":{"label":"teamtaverna:32__create_event_table","ref":"32__create_event_table","sha":"14edfb6bcaafb8b79735d25642bf2236cfe5dac7","user":{"login":"teamtaverna","id":20097682,"avatar_url":"https://avatars.githubusercontent.com/u/20097682?v=3","gravatar_id":"","url":"https://api.github.com/users/teamtaverna","html_url":"https://github.com/teamtaverna","followers_url":"https://api.github.com/users/teamtaverna/followers","following_url":"https://api.github.com/users/teamtaverna/following{/other_user}","gists_url":"https://api.github.com/users/teamtaverna/gists{/gist_id}","starred_url":"https://api.github.com/users/teamtaverna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamtaverna/subscriptions","organizations_url":"https://api.github.com/users/teamtaverna/orgs","repos_url":"https://api.github.com/users/teamtaverna/repos","events_url":"https://api.github.com/users/teamtaverna/events{/privacy}","received_events_url":"https://api.github.com/users/teamtaverna/received_events","type":"Organization","site_admin":false},"repo":{"id":61626290,"name":"core","full_name":"teamtaverna/core","owner":{"login":"teamtaverna","id":20097682,"avatar_url":"https://avatars.githubusercontent.com/u/20097682?v=3","gravatar_id":"","url":"https://api.github.com/users/teamtaverna","html_url":"https://github.com/teamtaverna","followers_url":"https://api.github.com/users/teamtaverna/followers","following_url":"https://api.github.com/users/teamtaverna/following{/other_user}","gists_url":"https://api.github.com/users/teamtaverna/gists{/gist_id}","starred_url":"https://api.github.com/users/teamtaverna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamtaverna/subscriptions","organizations_url":"https://api.github.com/users/teamtaverna/orgs","repos_url":"https://api.github.com/users/teamtaverna/repos","events_url":"https://api.github.com/users/teamtaverna/events{/privacy}","received_events_url":"https://api.github.com/users/teamtaverna/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teamtaverna/core","description":"The power house of Taverna app.","fork":false,"url":"https://api.github.com/repos/teamtaverna/core","forks_url":"https://api.github.com/repos/teamtaverna/core/forks","keys_url":"https://api.github.com/repos/teamtaverna/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teamtaverna/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teamtaverna/core/teams","hooks_url":"https://api.github.com/repos/teamtaverna/core/hooks","issue_events_url":"https://api.github.com/repos/teamtaverna/core/issues/events{/number}","events_url":"https://api.github.com/repos/teamtaverna/core/events","assignees_url":"https://api.github.com/repos/teamtaverna/core/assignees{/user}","branches_url":"https://api.github.com/repos/teamtaverna/core/branches{/branch}","tags_url":"https://api.github.com/repos/teamtaverna/core/tags","blobs_url":"https://api.github.com/repos/teamtaverna/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teamtaverna/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teamtaverna/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/teamtaverna/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teamtaverna/core/statuses/{sha}","languages_url":"https://api.github.com/repos/teamtaverna/core/languages","stargazers_url":"https://api.github.com/repos/teamtaverna/core/stargazers","contributors_url":"https://api.github.com/repos/teamtaverna/core/contributors","subscribers_url":"https://api.github.com/repos/teamtaverna/core/subscribers","subscription_url":"https://api.github.com/repos/teamtaverna/core/subscription","commits_url":"https://api.github.com/repos/teamtaverna/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/teamtaverna/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/teamtaverna/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/teamtaverna/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/teamtaverna/core/contents/{+path}","compare_url":"https://api.github.com/repos/teamtaverna/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teamtaverna/core/merges","archive_url":"https://api.github.com/repos/teamtaverna/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teamtaverna/core/downloads","issues_url":"https://api.github.com/repos/teamtaverna/core/issues{/number}","pulls_url":"https://api.github.com/repos/teamtaverna/core/pulls{/number}","milestones_url":"https://api.github.com/repos/teamtaverna/core/milestones{/number}","notifications_url":"https://api.github.com/repos/teamtaverna/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teamtaverna/core/labels{/name}","releases_url":"https://api.github.com/repos/teamtaverna/core/releases{/id}","deployments_url":"https://api.github.com/repos/teamtaverna/core/deployments","created_at":"2016-06-21T10:47:18Z","updated_at":"2016-09-27T11:18:54Z","pushed_at":"2016-09-29T11:15:34Z","git_url":"git://github.com/teamtaverna/core.git","ssh_url":"git@github.com:teamtaverna/core.git","clone_url":"https://github.com/teamtaverna/core.git","svn_url":"https://github.com/teamtaverna/core","homepage":"http://taverna-core.herokuapp.com/","size":113,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":25,"forks":0,"open_issues":25,"watchers":2,"default_branch":"staging"}},"base":{"label":"teamtaverna:staging","ref":"staging","sha":"cba2499f7a54d67643cec0c18c2d8d2301d2200d","user":{"login":"teamtaverna","id":20097682,"avatar_url":"https://avatars.githubusercontent.com/u/20097682?v=3","gravatar_id":"","url":"https://api.github.com/users/teamtaverna","html_url":"https://github.com/teamtaverna","followers_url":"https://api.github.com/users/teamtaverna/followers","following_url":"https://api.github.com/users/teamtaverna/following{/other_user}","gists_url":"https://api.github.com/users/teamtaverna/gists{/gist_id}","starred_url":"https://api.github.com/users/teamtaverna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamtaverna/subscriptions","organizations_url":"https://api.github.com/users/teamtaverna/orgs","repos_url":"https://api.github.com/users/teamtaverna/repos","events_url":"https://api.github.com/users/teamtaverna/events{/privacy}","received_events_url":"https://api.github.com/users/teamtaverna/received_events","type":"Organization","site_admin":false},"repo":{"id":61626290,"name":"core","full_name":"teamtaverna/core","owner":{"login":"teamtaverna","id":20097682,"avatar_url":"https://avatars.githubusercontent.com/u/20097682?v=3","gravatar_id":"","url":"https://api.github.com/users/teamtaverna","html_url":"https://github.com/teamtaverna","followers_url":"https://api.github.com/users/teamtaverna/followers","following_url":"https://api.github.com/users/teamtaverna/following{/other_user}","gists_url":"https://api.github.com/users/teamtaverna/gists{/gist_id}","starred_url":"https://api.github.com/users/teamtaverna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamtaverna/subscriptions","organizations_url":"https://api.github.com/users/teamtaverna/orgs","repos_url":"https://api.github.com/users/teamtaverna/repos","events_url":"https://api.github.com/users/teamtaverna/events{/privacy}","received_events_url":"https://api.github.com/users/teamtaverna/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teamtaverna/core","description":"The power house of Taverna app.","fork":false,"url":"https://api.github.com/repos/teamtaverna/core","forks_url":"https://api.github.com/repos/teamtaverna/core/forks","keys_url":"https://api.github.com/repos/teamtaverna/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teamtaverna/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teamtaverna/core/teams","hooks_url":"https://api.github.com/repos/teamtaverna/core/hooks","issue_events_url":"https://api.github.com/repos/teamtaverna/core/issues/events{/number}","events_url":"https://api.github.com/repos/teamtaverna/core/events","assignees_url":"https://api.github.com/repos/teamtaverna/core/assignees{/user}","branches_url":"https://api.github.com/repos/teamtaverna/core/branches{/branch}","tags_url":"https://api.github.com/repos/teamtaverna/core/tags","blobs_url":"https://api.github.com/repos/teamtaverna/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teamtaverna/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teamtaverna/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/teamtaverna/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teamtaverna/core/statuses/{sha}","languages_url":"https://api.github.com/repos/teamtaverna/core/languages","stargazers_url":"https://api.github.com/repos/teamtaverna/core/stargazers","contributors_url":"https://api.github.com/repos/teamtaverna/core/contributors","subscribers_url":"https://api.github.com/repos/teamtaverna/core/subscribers","subscription_url":"https://api.github.com/repos/teamtaverna/core/subscription","commits_url":"https://api.github.com/repos/teamtaverna/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/teamtaverna/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/teamtaverna/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/teamtaverna/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/teamtaverna/core/contents/{+path}","compare_url":"https://api.github.com/repos/teamtaverna/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teamtaverna/core/merges","archive_url":"https://api.github.com/repos/teamtaverna/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teamtaverna/core/downloads","issues_url":"https://api.github.com/repos/teamtaverna/core/issues{/number}","pulls_url":"https://api.github.com/repos/teamtaverna/core/pulls{/number}","milestones_url":"https://api.github.com/repos/teamtaverna/core/milestones{/number}","notifications_url":"https://api.github.com/repos/teamtaverna/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teamtaverna/core/labels{/name}","releases_url":"https://api.github.com/repos/teamtaverna/core/releases{/id}","deployments_url":"https://api.github.com/repos/teamtaverna/core/deployments","created_at":"2016-06-21T10:47:18Z","updated_at":"2016-09-27T11:18:54Z","pushed_at":"2016-09-29T11:15:34Z","git_url":"git://github.com/teamtaverna/core.git","ssh_url":"git@github.com:teamtaverna/core.git","clone_url":"https://github.com/teamtaverna/core.git","svn_url":"https://github.com/teamtaverna/core","homepage":"http://taverna-core.herokuapp.com/","size":113,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":25,"forks":0,"open_issues":25,"watchers":2,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/teamtaverna/core/pulls/76"},"html":{"href":"https://github.com/teamtaverna/core/pull/76"},"issue":{"href":"https://api.github.com/repos/teamtaverna/core/issues/76"},"comments":{"href":"https://api.github.com/repos/teamtaverna/core/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/teamtaverna/core/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/teamtaverna/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/teamtaverna/core/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/teamtaverna/core/statuses/14edfb6bcaafb8b79735d25642bf2236cfe5dac7"}}}}
{"actor":{"display_login":"andela-ooshodi"}}