GitHub PullRequestReviewCommentEvent at 2014-09-29 13:21:47
Repository: robottelo
Actor: Ichimonji10
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments/18152628","id":18152628,"diff_hunk":"@@ -92,17 +141,196 @@ def test_positive_create_1(self):\n         )\n         self.assertTrue(content_view.read_json()['composite'])\n \n-    @decorators.data('', ' ')\n-    def test_negative_create(self, name):\n-        \"\"\"@Test: Create a content view and provide invalid attributes.\n+    @decorators.data(\n+        gen_string('alpha', gen_integer(3, 30)),\n+        gen_string('alphanumeric', gen_integer(3, 30)),\n+        gen_string('cjk', gen_integer(3, 30)),\n+        gen_string('html', gen_integer(3, 30)),\n+        gen_string('latin1', gen_integer(3, 30)),\n+        gen_string('numeric', gen_integer(3, 30)),\n+        gen_string('utf8', gen_integer(3, 30)),\n+    )\n+    def test_positive_create_3(self, name):\n+        \"\"\"@Test: Create empty content-view with random names.\n+\n+        @Assert: Content-view is created and had random name.\n+\n+        @Feature: ContentView\n \n-        @Assert: No content view is created.\n+        \"\"\"\n+        content_view = entities.ContentView(\n+            name=name\n+        ).create()['id']\n+        attrs = entities.ContentView(id=content_view).read_json()\n+        self.assertEqual(attrs['name'], name)\n+\n+    @decorators.data(\n+        gen_string('alpha', gen_integer(3, 30)),\n+        gen_string('alphanumeric', gen_integer(3, 30)),\n+        gen_string('cjk', gen_integer(3, 30)),\n+        gen_string('html', gen_integer(3, 30)),\n+        gen_string('latin1', gen_integer(3, 30)),\n+        gen_string('numeric', gen_integer(3, 30)),\n+        gen_string('utf8', gen_integer(3, 30)),\n+    )\n+    def test_positive_create_4(self, description):\n+        \"\"\"@Test: Create empty content view with random description.\n+\n+        @Assert: Content-view is created and has random description.\n \n         @Feature: ContentView\n \n         \"\"\"\n-        with self.assertRaises(HTTPError):\n-            entities.ContentView(name=name).create()\n+        content_view = entities.ContentView(\n+            description=description\n+        ).create()['id']\n+        attrs = entities.ContentView(id=content_view).read_json()\n+        self.assertEqual(attrs['description'], description)\n+\n+\n+@ddt.ddt\n+class ContentViewPublishTestCase(TestCase):\n+    \"\"\"Tests for publishing content views.\"\"\"\n+\n+    def test_positive_publish_1(self):\n+        \"\"\"@Test: Publish empty content view once.\n+\n+        @Assert: Content-view is published and has 1 version.\n+\n+        @Feature: ContentView\n+\n+        \"\"\"\n+        content_view = entities.ContentView(\n+            id=entities.ContentView().create()['id'])\n+        # Publish it\n+        response = _publish(content_view)\n+        self.assertEqual(response, u'success')\n+\n+        # Assert that it only has 1 version, present in one environment\n+        content_view = entities.ContentView(id=content_view['id']).read_json()\n+        self.assertEqual(\n+            len(content_view['versions']),\n+            1,\n+            u'There should only be 1 version published.')\n+        self.assertEqual(\n+            len(content_view['versions'][0]['environment_ids']),\n+            1,\n+            u\"Content view should be present in 1 lifecycle only\")\n+\n+    def test_positive_publish_2(self):\n+        \"\"\"@Test: Publish empty content view random times.\n+\n+        @Assert: Content-view is published n-times and has n versions.\n+\n+        @Feature: ContentView\n+\n+        \"\"\"\n+        content_view = entities.ContentView(\n+            id=entities.ContentView().create()['id'])\n+        # Publish it random times\n+        repeat = gen_integer(2, 5)\n+        for _ in xrange(0, repeat):","path":"tests/foreman/api/test_contentview_v2.py","position":190,"original_position":190,"commit_id":"29bf7ee28cb579dee6e2f2e26466a9bb3a2c86af","original_commit_id":"29bf7ee28cb579dee6e2f2e26466a9bb3a2c86af","user":{"login":"Ichimonji10","id":1012989,"avatar_url":"https://avatars.githubusercontent.com/u/1012989?v=2","gravatar_id":"","url":"https://api.github.com/users/Ichimonji10","html_url":"https://github.com/Ichimonji10","followers_url":"https://api.github.com/users/Ichimonji10/followers","following_url":"https://api.github.com/users/Ichimonji10/following{/other_user}","gists_url":"https://api.github.com/users/Ichimonji10/gists{/gist_id}","starred_url":"https://api.github.com/users/Ichimonji10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ichimonji10/subscriptions","organizations_url":"https://api.github.com/users/Ichimonji10/orgs","repos_url":"https://api.github.com/users/Ichimonji10/repos","events_url":"https://api.github.com/users/Ichimonji10/events{/privacy}","received_events_url":"https://api.github.com/users/Ichimonji10/received_events","type":"User","site_admin":false},"body":"`xrange` is not compatible with Python 3. How about using `range` instead?","created_at":"2014-09-29T13:21:47Z","updated_at":"2014-09-29T13:21:47Z","html_url":"https://github.com/SatelliteQE/robottelo/pull/1458#discussion_r18152628","pull_request_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/1458","_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments/18152628"},"html":{"href":"https://github.com/SatelliteQE/robottelo/pull/1458#discussion_r18152628"},"pull_request":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/1458"}}},"pull_request":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/1458","id":21893671,"html_url":"https://github.com/SatelliteQE/robottelo/pull/1458","diff_url":"https://github.com/SatelliteQE/robottelo/pull/1458.diff","patch_url":"https://github.com/SatelliteQE/robottelo/pull/1458.patch","issue_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/1458","number":1458,"state":"open","locked":false,"title":"Added positive creation tests for content view.","user":{"login":"omaciel","id":53362,"avatar_url":"https://avatars.githubusercontent.com/u/53362?v=2","gravatar_id":"","url":"https://api.github.com/users/omaciel","html_url":"https://github.com/omaciel","followers_url":"https://api.github.com/users/omaciel/followers","following_url":"https://api.github.com/users/omaciel/following{/other_user}","gists_url":"https://api.github.com/users/omaciel/gists{/gist_id}","starred_url":"https://api.github.com/users/omaciel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omaciel/subscriptions","organizations_url":"https://api.github.com/users/omaciel/orgs","repos_url":"https://api.github.com/users/omaciel/repos","events_url":"https://api.github.com/users/omaciel/events{/privacy}","received_events_url":"https://api.github.com/users/omaciel/received_events","type":"User","site_admin":false},"body":"I am providing automated API test cases for Content Views as described\r\nby issue #1264. I have also provided 2 extra data-driven tests that\r\nexercise the creation by providing random string types for ``name`` and\r\n``description`` fields.","created_at":"2014-09-27T20:21:11Z","updated_at":"2014-09-29T13:21:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e82d0566c227f93ba998d38827ba03907d9a502","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/1458/commits","review_comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/1458/comments","review_comment_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/1458/comments","statuses_url":"https://api.github.com/repos/SatelliteQE/robottelo/statuses/29bf7ee28cb579dee6e2f2e26466a9bb3a2c86af","head":{"label":"omaciel:issue-1264","ref":"issue-1264","sha":"29bf7ee28cb579dee6e2f2e26466a9bb3a2c86af","user":{"login":"omaciel","id":53362,"avatar_url":"https://avatars.githubusercontent.com/u/53362?v=2","gravatar_id":"","url":"https://api.github.com/users/omaciel","html_url":"https://github.com/omaciel","followers_url":"https://api.github.com/users/omaciel/followers","following_url":"https://api.github.com/users/omaciel/following{/other_user}","gists_url":"https://api.github.com/users/omaciel/gists{/gist_id}","starred_url":"https://api.github.com/users/omaciel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omaciel/subscriptions","organizations_url":"https://api.github.com/users/omaciel/orgs","repos_url":"https://api.github.com/users/omaciel/repos","events_url":"https://api.github.com/users/omaciel/events{/privacy}","received_events_url":"https://api.github.com/users/omaciel/received_events","type":"User","site_admin":false},"repo":{"id":24061968,"name":"robottelo","full_name":"omaciel/robottelo","owner":{"login":"omaciel","id":53362,"avatar_url":"https://avatars.githubusercontent.com/u/53362?v=2","gravatar_id":"","url":"https://api.github.com/users/omaciel","html_url":"https://github.com/omaciel","followers_url":"https://api.github.com/users/omaciel/followers","following_url":"https://api.github.com/users/omaciel/following{/other_user}","gists_url":"https://api.github.com/users/omaciel/gists{/gist_id}","starred_url":"https://api.github.com/users/omaciel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omaciel/subscriptions","organizations_url":"https://api.github.com/users/omaciel/orgs","repos_url":"https://api.github.com/users/omaciel/repos","events_url":"https://api.github.com/users/omaciel/events{/privacy}","received_events_url":"https://api.github.com/users/omaciel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/omaciel/robottelo","description":"An automation testing framework for the Katello project.","fork":true,"url":"https://api.github.com/repos/omaciel/robottelo","forks_url":"https://api.github.com/repos/omaciel/robottelo/forks","keys_url":"https://api.github.com/repos/omaciel/robottelo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/omaciel/robottelo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/omaciel/robottelo/teams","hooks_url":"https://api.github.com/repos/omaciel/robottelo/hooks","issue_events_url":"https://api.github.com/repos/omaciel/robottelo/issues/events{/number}","events_url":"https://api.github.com/repos/omaciel/robottelo/events","assignees_url":"https://api.github.com/repos/omaciel/robottelo/assignees{/user}","branches_url":"https://api.github.com/repos/omaciel/robottelo/branches{/branch}","tags_url":"https://api.github.com/repos/omaciel/robottelo/tags","blobs_url":"https://api.github.com/repos/omaciel/robottelo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/omaciel/robottelo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/omaciel/robottelo/git/refs{/sha}","trees_url":"https://api.github.com/repos/omaciel/robottelo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/omaciel/robottelo/statuses/{sha}","languages_url":"https://api.github.com/repos/omaciel/robottelo/languages","stargazers_url":"https://api.github.com/repos/omaciel/robottelo/stargazers","contributors_url":"https://api.github.com/repos/omaciel/robottelo/contributors","subscribers_url":"https://api.github.com/repos/omaciel/robottelo/subscribers","subscription_url":"https://api.github.com/repos/omaciel/robottelo/subscription","commits_url":"https://api.github.com/repos/omaciel/robottelo/commits{/sha}","git_commits_url":"https://api.github.com/repos/omaciel/robottelo/git/commits{/sha}","comments_url":"https://api.github.com/repos/omaciel/robottelo/comments{/number}","issue_comment_url":"https://api.github.com/repos/omaciel/robottelo/issues/comments/{number}","contents_url":"https://api.github.com/repos/omaciel/robottelo/contents/{+path}","compare_url":"https://api.github.com/repos/omaciel/robottelo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/omaciel/robottelo/merges","archive_url":"https://api.github.com/repos/omaciel/robottelo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/omaciel/robottelo/downloads","issues_url":"https://api.github.com/repos/omaciel/robottelo/issues{/number}","pulls_url":"https://api.github.com/repos/omaciel/robottelo/pulls{/number}","milestones_url":"https://api.github.com/repos/omaciel/robottelo/milestones{/number}","notifications_url":"https://api.github.com/repos/omaciel/robottelo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/omaciel/robottelo/labels{/name}","releases_url":"https://api.github.com/repos/omaciel/robottelo/releases{/id}","created_at":"2014-09-15T15:32:54Z","updated_at":"2014-09-24T16:17:46Z","pushed_at":"2014-09-29T13:13:12Z","git_url":"git://github.com/omaciel/robottelo.git","ssh_url":"git@github.com:omaciel/robottelo.git","clone_url":"https://github.com/omaciel/robottelo.git","svn_url":"https://github.com/omaciel/robottelo","homepage":null,"size":5097,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SatelliteQE:master","ref":"master","sha":"9f4953d020279e9d30a4d38a3030cb1cd1a640c7","user":{"login":"SatelliteQE","id":8754276,"avatar_url":"https://avatars.githubusercontent.com/u/8754276?v=2","gravatar_id":"","url":"https://api.github.com/users/SatelliteQE","html_url":"https://github.com/SatelliteQE","followers_url":"https://api.github.com/users/SatelliteQE/followers","following_url":"https://api.github.com/users/SatelliteQE/following{/other_user}","gists_url":"https://api.github.com/users/SatelliteQE/gists{/gist_id}","starred_url":"https://api.github.com/users/SatelliteQE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SatelliteQE/subscriptions","organizations_url":"https://api.github.com/users/SatelliteQE/orgs","repos_url":"https://api.github.com/users/SatelliteQE/repos","events_url":"https://api.github.com/users/SatelliteQE/events{/privacy}","received_events_url":"https://api.github.com/users/SatelliteQE/received_events","type":"Organization","site_admin":false},"repo":{"id":4000279,"name":"robottelo","full_name":"SatelliteQE/robottelo","owner":{"login":"SatelliteQE","id":8754276,"avatar_url":"https://avatars.githubusercontent.com/u/8754276?v=2","gravatar_id":"","url":"https://api.github.com/users/SatelliteQE","html_url":"https://github.com/SatelliteQE","followers_url":"https://api.github.com/users/SatelliteQE/followers","following_url":"https://api.github.com/users/SatelliteQE/following{/other_user}","gists_url":"https://api.github.com/users/SatelliteQE/gists{/gist_id}","starred_url":"https://api.github.com/users/SatelliteQE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SatelliteQE/subscriptions","organizations_url":"https://api.github.com/users/SatelliteQE/orgs","repos_url":"https://api.github.com/users/SatelliteQE/repos","events_url":"https://api.github.com/users/SatelliteQE/events{/privacy}","received_events_url":"https://api.github.com/users/SatelliteQE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SatelliteQE/robottelo","description":"An automation testing framework for the Katello project.","fork":false,"url":"https://api.github.com/repos/SatelliteQE/robottelo","forks_url":"https://api.github.com/repos/SatelliteQE/robottelo/forks","keys_url":"https://api.github.com/repos/SatelliteQE/robottelo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SatelliteQE/robottelo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SatelliteQE/robottelo/teams","hooks_url":"https://api.github.com/repos/SatelliteQE/robottelo/hooks","issue_events_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/events{/number}","events_url":"https://api.github.com/repos/SatelliteQE/robottelo/events","assignees_url":"https://api.github.com/repos/SatelliteQE/robottelo/assignees{/user}","branches_url":"https://api.github.com/repos/SatelliteQE/robottelo/branches{/branch}","tags_url":"https://api.github.com/repos/SatelliteQE/robottelo/tags","blobs_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/refs{/sha}","trees_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SatelliteQE/robottelo/statuses/{sha}","languages_url":"https://api.github.com/repos/SatelliteQE/robottelo/languages","stargazers_url":"https://api.github.com/repos/SatelliteQE/robottelo/stargazers","contributors_url":"https://api.github.com/repos/SatelliteQE/robottelo/contributors","subscribers_url":"https://api.github.com/repos/SatelliteQE/robottelo/subscribers","subscription_url":"https://api.github.com/repos/SatelliteQE/robottelo/subscription","commits_url":"https://api.github.com/repos/SatelliteQE/robottelo/commits{/sha}","git_commits_url":"https://api.github.com/repos/SatelliteQE/robottelo/git/commits{/sha}","comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/comments{/number}","issue_comment_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/comments/{number}","contents_url":"https://api.github.com/repos/SatelliteQE/robottelo/contents/{+path}","compare_url":"https://api.github.com/repos/SatelliteQE/robottelo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SatelliteQE/robottelo/merges","archive_url":"https://api.github.com/repos/SatelliteQE/robottelo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SatelliteQE/robottelo/downloads","issues_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues{/number}","pulls_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls{/number}","milestones_url":"https://api.github.com/repos/SatelliteQE/robottelo/milestones{/number}","notifications_url":"https://api.github.com/repos/SatelliteQE/robottelo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SatelliteQE/robottelo/labels{/name}","releases_url":"https://api.github.com/repos/SatelliteQE/robottelo/releases{/id}","created_at":"2012-04-12T01:36:39Z","updated_at":"2014-09-15T15:19:49Z","pushed_at":"2014-09-27T13:04:10Z","git_url":"git://github.com/SatelliteQE/robottelo.git","ssh_url":"git@github.com:SatelliteQE/robottelo.git","clone_url":"https://github.com/SatelliteQE/robottelo.git","svn_url":"https://github.com/SatelliteQE/robottelo","homepage":null,"size":23659,"stargazers_count":16,"watchers_count":16,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":20,"mirror_url":null,"open_issues_count":101,"forks":20,"open_issues":101,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/1458"},"html":{"href":"https://github.com/SatelliteQE/robottelo/pull/1458"},"issue":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/issues/1458"},"comments":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/issues/1458/comments"},"review_comments":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/1458/comments"},"review_comment":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/1458/commits"},"statuses":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/statuses/29bf7ee28cb579dee6e2f2e26466a9bb3a2c86af"}}}}