{"action":"created","comment":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments/33773211","id":33773211,"diff_hunk":"@@ -0,0 +1,431 @@\n+# -*- encoding: utf-8 -*-\n+\"\"\"Test class for Content View Filters\"\"\"\n+\n+from ddt import ddt\n+from fauxfactory import gen_choice, gen_string\n+from random import randint\n+from robottelo.cli.contentview import ContentView\n+from robottelo.cli.factory import (\n+    CLIFactoryError,\n+    make_content_view,\n+    make_org,\n+    make_product,\n+    make_repository,\n+)\n+from robottelo.cli.repository import Repository\n+from robottelo.common.constants import DOCKER_REGISTRY_HUB\n+from robottelo.common.decorators import data, skip_if_bug_open\n+from robottelo.test import CLITestCase\n+\n+\n+@ddt\n+class TestContentViewFilter(CLITestCase):\n+    \"\"\"Content View Filter CLI tests\"\"\"\n+\n+    @classmethod\n+    def setUpClass(cls):\n+        \"\"\"Init single organization, product and repository for all tests\"\"\"\n+        super(TestContentViewFilter, cls).setUpClass()\n+        cls.org = make_org()\n+        cls.product = make_product({u'organization-id': cls.org['id']})\n+        cls.repo = make_repository({u'product-id': cls.product['id']})\n+        Repository.synchronize({u'id': cls.repo['id']})\n+\n+    def setUp(self):\n+        \"\"\"Init content view with repo per each test\"\"\"\n+        super(TestContentViewFilter, self).setUp()\n+        self.cvf_name = gen_string('utf8')\n+        try:\n+            self.content_view = make_content_view({\n+                u'organization-id': self.org['id'],\n+            })\n+        except CLIFactoryError as err:\n+            self.fail(err)\n+\n+        result = ContentView.add_repository({\n+            u'id': self.content_view['id'],\n+            u'repository-id': self.repo['id'],\n+        })\n+        self.assertEqual(result.return_code, 0)\n+\n+    @data(\n+        gen_string('alphanumeric', randint(1, 255)),\n+        gen_string('alpha', randint(1, 255)),\n+        gen_string('cjk', randint(1, 85)),\n+        gen_string('latin1', randint(1, 255)),\n+        gen_string('numeric', randint(1, 255)),\n+        gen_string('utf8', randint(1, 85)),\n+        gen_string('html', 85),\n+    )\n+    def test_create_cvf_with_different_names(self, name):\n+        \"\"\"Test: Create new content view filter and assign it to existing\n+        content view by id. Use different value types as a name and random\n+        filter content type and random filter type as a parameters for this\n+        filter\n+\n+        @Feature: Content View Filter\n+\n+        @Assert: Content view filter created successfully and has correct and\n+        expected parameters\n+\n+        \"\"\"\n+        filter_content_type = gen_choice(['rpm', 'package_group', 'erratum'])","path":"tests/foreman/cli/test_contentviewfilter.py","position":71,"original_position":72,"commit_id":"6ae7c81338f645c4a25444131ba25c895daaa5b8","original_commit_id":"8fdab3c8bc3b786e03612b6b907b6c00ea2b7509","user":{"login":"oshtaier","id":10895065,"avatar_url":"https://avatars.githubusercontent.com/u/10895065?v=3","gravatar_id":"","url":"https://api.github.com/users/oshtaier","html_url":"https://github.com/oshtaier","followers_url":"https://api.github.com/users/oshtaier/followers","following_url":"https://api.github.com/users/oshtaier/following{/other_user}","gists_url":"https://api.github.com/users/oshtaier/gists{/gist_id}","starred_url":"https://api.github.com/users/oshtaier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oshtaier/subscriptions","organizations_url":"https://api.github.com/users/oshtaier/orgs","repos_url":"https://api.github.com/users/oshtaier/repos","events_url":"https://api.github.com/users/oshtaier/events{/privacy}","received_events_url":"https://api.github.com/users/oshtaier/received_events","type":"User","site_admin":false},"body":"@Ichimonji10 right","created_at":"2015-07-02T12:40:53Z","updated_at":"2015-07-02T12:40:53Z","html_url":"https://github.com/SatelliteQE/robottelo/pull/2519#discussion_r33773211","pull_request_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2519","_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments/33773211"},"html":{"href":"https://github.com/SatelliteQE/robottelo/pull/2519#discussion_r33773211"},"pull_request":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2519"}}},"pull_request":{"url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2519","id":38977806,"html_url":"https://github.com/SatelliteQE/robottelo/pull/2519","diff_url":"https://github.com/SatelliteQE/robottelo/pull/2519.diff","patch_url":"https://github.com/SatelliteQE/robottelo/pull/2519.patch","issue_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2519","number":2519,"state":"open","locked":false,"title":"Add coverage for create content-view filter in CLI","user":{"login":"oshtaier","id":10895065,"avatar_url":"https://avatars.githubusercontent.com/u/10895065?v=3","gravatar_id":"","url":"https://api.github.com/users/oshtaier","html_url":"https://github.com/oshtaier","followers_url":"https://api.github.com/users/oshtaier/followers","following_url":"https://api.github.com/users/oshtaier/following{/other_user}","gists_url":"https://api.github.com/users/oshtaier/gists{/gist_id}","starred_url":"https://api.github.com/users/oshtaier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oshtaier/subscriptions","organizations_url":"https://api.github.com/users/oshtaier/orgs","repos_url":"https://api.github.com/users/oshtaier/repos","events_url":"https://api.github.com/users/oshtaier/events{/privacy}","received_events_url":"https://api.github.com/users/oshtaier/received_events","type":"User","site_admin":false},"body":"Closes #2459\r\n```\r\nnosetests tests/foreman/cli/test_contentviewfilter.py\r\n...S....................S...\r\n----------------------------------------------------------------------\r\nRan 28 tests in 634.124s\r\n```\r\n\r\nFiled BZ:\r\nBug 1236532 - Cannot get content view filter description using hammer info\r\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1236532\r\n\r\nUpdated BZ:\r\nBug 1228890 - hammer content-view filter create ignores repos if name used instead of ID\r\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1228890","created_at":"2015-07-01T12:42:36Z","updated_at":"2015-07-02T12:40:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef0fefbeb297bdb1c87c1066af1b4e3d160ee01f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2519/commits","review_comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2519/comments","review_comment_url":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2519/comments","statuses_url":"https://api.github.com/repos/SatelliteQE/robottelo/statuses/6ae7c81338f645c4a25444131ba25c895daaa5b8","head":{"label":"oshtaier:Issue_2459","ref":"Issue_2459","sha":"6ae7c81338f645c4a25444131ba25c895daaa5b8","user":{"login":"oshtaier","id":10895065,"avatar_url":"https://avatars.githubusercontent.com/u/10895065?v=3","gravatar_id":"","url":"https://api.github.com/users/oshtaier","html_url":"https://github.com/oshtaier","followers_url":"https://api.github.com/users/oshtaier/followers","following_url":"https://api.github.com/users/oshtaier/following{/other_user}","gists_url":"https://api.github.com/users/oshtaier/gists{/gist_id}","starred_url":"https://api.github.com/users/oshtaier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oshtaier/subscriptions","organizations_url":"https://api.github.com/users/oshtaier/orgs","repos_url":"https://api.github.com/users/oshtaier/repos","events_url":"https://api.github.com/users/oshtaier/events{/privacy}","received_events_url":"https://api.github.com/users/oshtaier/received_events","type":"User","site_admin":false},"repo":{"id":33350829,"name":"robottelo","full_name":"oshtaier/robottelo","owner":{"login":"oshtaier","id":10895065,"avatar_url":"https://avatars.githubusercontent.com/u/10895065?v=3","gravatar_id":"","url":"https://api.github.com/users/oshtaier","html_url":"https://github.com/oshtaier","followers_url":"https://api.github.com/users/oshtaier/followers","following_url":"https://api.github.com/users/oshtaier/following{/other_user}","gists_url":"https://api.github.com/users/oshtaier/gists{/gist_id}","starred_url":"https://api.github.com/users/oshtaier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oshtaier/subscriptions","organizations_url":"https://api.github.com/users/oshtaier/orgs","repos_url":"https://api.github.com/users/oshtaier/repos","events_url":"https://api.github.com/users/oshtaier/events{/privacy}","received_events_url":"https://api.github.com/users/oshtaier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oshtaier/robottelo","description":"Robottelo is a test suite which exercises The Foreman.","fork":true,"url":"https://api.github.com/repos/oshtaier/robottelo","forks_url":"https://api.github.com/repos/oshtaier/robottelo/forks","keys_url":"https://api.github.com/repos/oshtaier/robottelo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oshtaier/robottelo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oshtaier/robottelo/teams","hooks_url":"https://api.github.com/repos/oshtaier/robottelo/hooks","issue_events_url":"https://api.github.com/repos/oshtaier/robottelo/issues/events{/number}","events_url":"https://api.github.com/repos/oshtaier/robottelo/events","assignees_url":"https://api.github.com/repos/oshtaier/robottelo/assignees{/user}","branches_url":"https://api.github.com/repos/oshtaier/robottelo/branches{/branch}","tags_url":"https://api.github.com/repos/oshtaier/robottelo/tags","blobs_url":"https://api.github.com/repos/oshtaier/robottelo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oshtaier/robottelo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oshtaier/robottelo/git/refs{/sha}","trees_url":"https://api.github.com/repos/oshtaier/robottelo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oshtaier/robottelo/statuses/{sha}","languages_url":"https://api.github.com/repos/oshtaier/robottelo/languages","stargazers_url":"https://api.github.com/repos/oshtaier/robottelo/stargazers","contributors_url":"https://api.github.com/repos/oshtaier/robottelo/contributors","subscribers_url":"https://api.github.com/repos/oshtaier/robottelo/subscribers","subscription_url":"https://api.github.com/repos/oshtaier/robottelo/subscription","commits_url":"https://api.github.com/repos/oshtaier/robottelo/commits{/sha}","git_commits_url":"https://api.github.com/repos/oshtaier/robottelo/git/commits{/sha}","comments_url":"https://api.github.com/repos/oshtaier/robottelo/comments{/number}","issue_comment_url":"https://api.github.com/repos/oshtaier/robottelo/issues/comments{/number}","contents_url":"https://api.github.com/repos/oshtaier/robottelo/contents/{+path}","compare_url":"https://api.github.com/repos/oshtaier/robottelo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oshtaier/robottelo/merges","archive_url":"https://api.github.com/repos/oshtaier/robottelo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oshtaier/robottelo/downloads","issues_url":"https://api.github.com/repos/oshtaier/robottelo/issues{/number}","pulls_url":"https://api.github.com/repos/oshtaier/robottelo/pulls{/number}","milestones_url":"https://api.github.com/repos/oshtaier/robottelo/milestones{/number}","notifications_url":"https://api.github.com/repos/oshtaier/robottelo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oshtaier/robottelo/labels{/name}","releases_url":"https://api.github.com/repos/oshtaier/robottelo/releases{/id}","created_at":"2015-04-03T06:48:07Z","updated_at":"2015-04-06T12:49:17Z","pushed_at":"2015-07-02T10:57:17Z","git_url":"git://github.com/oshtaier/robottelo.git","ssh_url":"git@github.com:oshtaier/robottelo.git","clone_url":"https://github.com/oshtaier/robottelo.git","svn_url":"https://github.com/oshtaier/robottelo","homepage":"","size":8422,"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":"07fe4d4ff5a1c507c32f62b53d3b1d8bf3a79558","user":{"login":"SatelliteQE","id":8754276,"avatar_url":"https://avatars.githubusercontent.com/u/8754276?v=3","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=3","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":"Robottelo is a test suite which exercises The Foreman.","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":"2015-06-23T17:21:41Z","pushed_at":"2015-07-02T10:58:44Z","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":"","size":17768,"stargazers_count":22,"watchers_count":22,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":29,"mirror_url":null,"open_issues_count":220,"forks":29,"open_issues":220,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2519"},"html":{"href":"https://github.com/SatelliteQE/robottelo/pull/2519"},"issue":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2519"},"comments":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/issues/2519/comments"},"review_comments":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2519/comments"},"review_comment":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/pulls/2519/commits"},"statuses":{"href":"https://api.github.com/repos/SatelliteQE/robottelo/statuses/6ae7c81338f645c4a25444131ba25c895daaa5b8"}}}}