{"action":"created","comment":{"url":"https://api.github.com/repos/stxnext/lunch-app/pulls/comments/23297837","id":23297837,"diff_hunk":"@@ -18,28 +49,162 @@ def setUp(self):\n         Before each test, set up a environment.\n         \"\"\"\n         self.client = main.app.test_client()\n+        self.__transaction = connection.begin_nested()\n+        self.session = Session(connection)\n \n     def tearDown(self):\n         \"\"\"\n         Get rid of unused objects after each test.\n         \"\"\"\n-        pass\n+        self.session.close()\n \n-    def test_mainpage(self):\n+    def test_mainpage_view(self):\n         \"\"\"\n-        Test main page redirect.\n+        Test main page view.\n         \"\"\"\n         resp = self.client.get('/')\n-        self.assertEqual(resp.status_code, 302)\n-        self.assertTrue(resp.headers['Location'].endswith('/overview'))\n+        self.assertEqual(resp.status_code, 200)\n+\n+    def test_info_view(self):\n+        \"\"\"\n+        Test info page view.\n+        \"\"\"\n+        resp = self.client.get('/info')\n+        self.assertEqual(resp.status_code, 200)\n+\n+    def test_my_orders_view(self):\n+        \"\"\"\n+        Test my orders page view.\n+        \"\"\"\n+        with self.assertRaises(AttributeError):\n+            resp = self.client.get('/my_orders')\n+            self.assertEqual(resp.status_code, 200)\n \n-    def test_overview(self):\n+    def test_overview_view(self):\n         \"\"\"\n         Test overview page.\n         \"\"\"\n         resp = self.client.get('/overview')\n         self.assertEqual(resp.status_code, 200)\n-        self.assertIn(b'<h2>Overview</h2>', resp.data)\n+\n+    @patch('lunch_app.views.current_user', new=MOCK_ADMIN)\n+    def test_create_order_view(self):\n+        \"\"\"\n+        Test create order page.\n+        \"\"\"\n+        resp = self.client.get('/order')\n+        self.assertEqual(resp.status_code, 200)\n+        data = {'cost': 12,\n+                'company': 'Pod Koziołkiem',\n+                'description': 'dobre_jedzonko',\n+                'send_me_a_copy': False,\n+                'date': date(2015, 1, 21),","path":"src/lunch_app/tests.py","position":106,"original_position":106,"commit_id":"fe05bb680b28557762a1916ff0b3ae6518499841","original_commit_id":"fe05bb680b28557762a1916ff0b3ae6518499841","user":{"login":"sargo","id":155872,"avatar_url":"https://avatars.githubusercontent.com/u/155872?v=3","gravatar_id":"","url":"https://api.github.com/users/sargo","html_url":"https://github.com/sargo","followers_url":"https://api.github.com/users/sargo/followers","following_url":"https://api.github.com/users/sargo/following{/other_user}","gists_url":"https://api.github.com/users/sargo/gists{/gist_id}","starred_url":"https://api.github.com/users/sargo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sargo/subscriptions","organizations_url":"https://api.github.com/users/sargo/orgs","repos_url":"https://api.github.com/users/sargo/repos","events_url":"https://api.github.com/users/sargo/events{/privacy}","received_events_url":"https://api.github.com/users/sargo/received_events","type":"User","site_admin":false},"body":"string","created_at":"2015-01-21T13:14:21Z","updated_at":"2015-01-21T13:14:21Z","html_url":"https://github.com/stxnext/lunch-app/pull/1#discussion_r23297837","pull_request_url":"https://api.github.com/repos/stxnext/lunch-app/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/stxnext/lunch-app/pulls/comments/23297837"},"html":{"href":"https://github.com/stxnext/lunch-app/pull/1#discussion_r23297837"},"pull_request":{"href":"https://api.github.com/repos/stxnext/lunch-app/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/stxnext/lunch-app/pulls/1","id":27504042,"html_url":"https://github.com/stxnext/lunch-app/pull/1","diff_url":"https://github.com/stxnext/lunch-app/pull/1.diff","patch_url":"https://github.com/stxnext/lunch-app/pull/1.patch","issue_url":"https://api.github.com/repos/stxnext/lunch-app/issues/1","number":1,"state":"open","locked":false,"title":"1 form","user":{"login":"pdyba","id":9288974,"avatar_url":"https://avatars.githubusercontent.com/u/9288974?v=3","gravatar_id":"","url":"https://api.github.com/users/pdyba","html_url":"https://github.com/pdyba","followers_url":"https://api.github.com/users/pdyba/followers","following_url":"https://api.github.com/users/pdyba/following{/other_user}","gists_url":"https://api.github.com/users/pdyba/gists{/gist_id}","starred_url":"https://api.github.com/users/pdyba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdyba/subscriptions","organizations_url":"https://api.github.com/users/pdyba/orgs","repos_url":"https://api.github.com/users/pdyba/repos","events_url":"https://api.github.com/users/pdyba/events{/privacy}","received_events_url":"https://api.github.com/users/pdyba/received_events","type":"User","site_admin":false},"body":"created working form","created_at":"2015-01-16T13:06:42Z","updated_at":"2015-01-21T13:14:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e33ce9deb881d3500e28de6220a4a05390ac257","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stxnext/lunch-app/pulls/1/commits","review_comments_url":"https://api.github.com/repos/stxnext/lunch-app/pulls/1/comments","review_comment_url":"https://api.github.com/repos/stxnext/lunch-app/pulls/comments/{number}","comments_url":"https://api.github.com/repos/stxnext/lunch-app/issues/1/comments","statuses_url":"https://api.github.com/repos/stxnext/lunch-app/statuses/fe05bb680b28557762a1916ff0b3ae6518499841","head":{"label":"pdyba:1_form","ref":"1_form","sha":"fe05bb680b28557762a1916ff0b3ae6518499841","user":{"login":"pdyba","id":9288974,"avatar_url":"https://avatars.githubusercontent.com/u/9288974?v=3","gravatar_id":"","url":"https://api.github.com/users/pdyba","html_url":"https://github.com/pdyba","followers_url":"https://api.github.com/users/pdyba/followers","following_url":"https://api.github.com/users/pdyba/following{/other_user}","gists_url":"https://api.github.com/users/pdyba/gists{/gist_id}","starred_url":"https://api.github.com/users/pdyba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdyba/subscriptions","organizations_url":"https://api.github.com/users/pdyba/orgs","repos_url":"https://api.github.com/users/pdyba/repos","events_url":"https://api.github.com/users/pdyba/events{/privacy}","received_events_url":"https://api.github.com/users/pdyba/received_events","type":"User","site_admin":false},"repo":{"id":29301538,"name":"lunch-app","full_name":"pdyba/lunch-app","owner":{"login":"pdyba","id":9288974,"avatar_url":"https://avatars.githubusercontent.com/u/9288974?v=3","gravatar_id":"","url":"https://api.github.com/users/pdyba","html_url":"https://github.com/pdyba","followers_url":"https://api.github.com/users/pdyba/followers","following_url":"https://api.github.com/users/pdyba/following{/other_user}","gists_url":"https://api.github.com/users/pdyba/gists{/gist_id}","starred_url":"https://api.github.com/users/pdyba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdyba/subscriptions","organizations_url":"https://api.github.com/users/pdyba/orgs","repos_url":"https://api.github.com/users/pdyba/repos","events_url":"https://api.github.com/users/pdyba/events{/privacy}","received_events_url":"https://api.github.com/users/pdyba/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pdyba/lunch-app","description":"Aplikacja do zamawiania lunchy","fork":true,"url":"https://api.github.com/repos/pdyba/lunch-app","forks_url":"https://api.github.com/repos/pdyba/lunch-app/forks","keys_url":"https://api.github.com/repos/pdyba/lunch-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pdyba/lunch-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pdyba/lunch-app/teams","hooks_url":"https://api.github.com/repos/pdyba/lunch-app/hooks","issue_events_url":"https://api.github.com/repos/pdyba/lunch-app/issues/events{/number}","events_url":"https://api.github.com/repos/pdyba/lunch-app/events","assignees_url":"https://api.github.com/repos/pdyba/lunch-app/assignees{/user}","branches_url":"https://api.github.com/repos/pdyba/lunch-app/branches{/branch}","tags_url":"https://api.github.com/repos/pdyba/lunch-app/tags","blobs_url":"https://api.github.com/repos/pdyba/lunch-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pdyba/lunch-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pdyba/lunch-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/pdyba/lunch-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pdyba/lunch-app/statuses/{sha}","languages_url":"https://api.github.com/repos/pdyba/lunch-app/languages","stargazers_url":"https://api.github.com/repos/pdyba/lunch-app/stargazers","contributors_url":"https://api.github.com/repos/pdyba/lunch-app/contributors","subscribers_url":"https://api.github.com/repos/pdyba/lunch-app/subscribers","subscription_url":"https://api.github.com/repos/pdyba/lunch-app/subscription","commits_url":"https://api.github.com/repos/pdyba/lunch-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/pdyba/lunch-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/pdyba/lunch-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/pdyba/lunch-app/issues/comments/{number}","contents_url":"https://api.github.com/repos/pdyba/lunch-app/contents/{+path}","compare_url":"https://api.github.com/repos/pdyba/lunch-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pdyba/lunch-app/merges","archive_url":"https://api.github.com/repos/pdyba/lunch-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pdyba/lunch-app/downloads","issues_url":"https://api.github.com/repos/pdyba/lunch-app/issues{/number}","pulls_url":"https://api.github.com/repos/pdyba/lunch-app/pulls{/number}","milestones_url":"https://api.github.com/repos/pdyba/lunch-app/milestones{/number}","notifications_url":"https://api.github.com/repos/pdyba/lunch-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pdyba/lunch-app/labels{/name}","releases_url":"https://api.github.com/repos/pdyba/lunch-app/releases{/id}","created_at":"2015-01-15T14:40:36Z","updated_at":"2015-01-16T13:05:09Z","pushed_at":"2015-01-21T12:16:13Z","git_url":"git://github.com/pdyba/lunch-app.git","ssh_url":"git@github.com:pdyba/lunch-app.git","clone_url":"https://github.com/pdyba/lunch-app.git","svn_url":"https://github.com/pdyba/lunch-app","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"stxnext:master","ref":"master","sha":"ae714821d0681c02970cb88c56810f96874a812d","user":{"login":"stxnext","id":1661949,"avatar_url":"https://avatars.githubusercontent.com/u/1661949?v=3","gravatar_id":"","url":"https://api.github.com/users/stxnext","html_url":"https://github.com/stxnext","followers_url":"https://api.github.com/users/stxnext/followers","following_url":"https://api.github.com/users/stxnext/following{/other_user}","gists_url":"https://api.github.com/users/stxnext/gists{/gist_id}","starred_url":"https://api.github.com/users/stxnext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stxnext/subscriptions","organizations_url":"https://api.github.com/users/stxnext/orgs","repos_url":"https://api.github.com/users/stxnext/repos","events_url":"https://api.github.com/users/stxnext/events{/privacy}","received_events_url":"https://api.github.com/users/stxnext/received_events","type":"Organization","site_admin":false},"repo":{"id":29291687,"name":"lunch-app","full_name":"stxnext/lunch-app","owner":{"login":"stxnext","id":1661949,"avatar_url":"https://avatars.githubusercontent.com/u/1661949?v=3","gravatar_id":"","url":"https://api.github.com/users/stxnext","html_url":"https://github.com/stxnext","followers_url":"https://api.github.com/users/stxnext/followers","following_url":"https://api.github.com/users/stxnext/following{/other_user}","gists_url":"https://api.github.com/users/stxnext/gists{/gist_id}","starred_url":"https://api.github.com/users/stxnext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stxnext/subscriptions","organizations_url":"https://api.github.com/users/stxnext/orgs","repos_url":"https://api.github.com/users/stxnext/repos","events_url":"https://api.github.com/users/stxnext/events{/privacy}","received_events_url":"https://api.github.com/users/stxnext/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stxnext/lunch-app","description":"Aplikacja do zamawiania lunchy","fork":false,"url":"https://api.github.com/repos/stxnext/lunch-app","forks_url":"https://api.github.com/repos/stxnext/lunch-app/forks","keys_url":"https://api.github.com/repos/stxnext/lunch-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stxnext/lunch-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stxnext/lunch-app/teams","hooks_url":"https://api.github.com/repos/stxnext/lunch-app/hooks","issue_events_url":"https://api.github.com/repos/stxnext/lunch-app/issues/events{/number}","events_url":"https://api.github.com/repos/stxnext/lunch-app/events","assignees_url":"https://api.github.com/repos/stxnext/lunch-app/assignees{/user}","branches_url":"https://api.github.com/repos/stxnext/lunch-app/branches{/branch}","tags_url":"https://api.github.com/repos/stxnext/lunch-app/tags","blobs_url":"https://api.github.com/repos/stxnext/lunch-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stxnext/lunch-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stxnext/lunch-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/stxnext/lunch-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stxnext/lunch-app/statuses/{sha}","languages_url":"https://api.github.com/repos/stxnext/lunch-app/languages","stargazers_url":"https://api.github.com/repos/stxnext/lunch-app/stargazers","contributors_url":"https://api.github.com/repos/stxnext/lunch-app/contributors","subscribers_url":"https://api.github.com/repos/stxnext/lunch-app/subscribers","subscription_url":"https://api.github.com/repos/stxnext/lunch-app/subscription","commits_url":"https://api.github.com/repos/stxnext/lunch-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/stxnext/lunch-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/stxnext/lunch-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/stxnext/lunch-app/issues/comments/{number}","contents_url":"https://api.github.com/repos/stxnext/lunch-app/contents/{+path}","compare_url":"https://api.github.com/repos/stxnext/lunch-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stxnext/lunch-app/merges","archive_url":"https://api.github.com/repos/stxnext/lunch-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stxnext/lunch-app/downloads","issues_url":"https://api.github.com/repos/stxnext/lunch-app/issues{/number}","pulls_url":"https://api.github.com/repos/stxnext/lunch-app/pulls{/number}","milestones_url":"https://api.github.com/repos/stxnext/lunch-app/milestones{/number}","notifications_url":"https://api.github.com/repos/stxnext/lunch-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stxnext/lunch-app/labels{/name}","releases_url":"https://api.github.com/repos/stxnext/lunch-app/releases{/id}","created_at":"2015-01-15T10:09:20Z","updated_at":"2015-01-15T11:22:29Z","pushed_at":"2015-01-15T11:22:28Z","git_url":"git://github.com/stxnext/lunch-app.git","ssh_url":"git@github.com:stxnext/lunch-app.git","clone_url":"https://github.com/stxnext/lunch-app.git","svn_url":"https://github.com/stxnext/lunch-app","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stxnext/lunch-app/pulls/1"},"html":{"href":"https://github.com/stxnext/lunch-app/pull/1"},"issue":{"href":"https://api.github.com/repos/stxnext/lunch-app/issues/1"},"comments":{"href":"https://api.github.com/repos/stxnext/lunch-app/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/stxnext/lunch-app/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/stxnext/lunch-app/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/stxnext/lunch-app/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/stxnext/lunch-app/statuses/fe05bb680b28557762a1916ff0b3ae6518499841"}}}}