{"action":"created","comment":{"url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/comments/84644100","pull_request_review_id":5407740,"id":84644100,"diff_hunk":"@@ -0,0 +1,122 @@\n+# Copyright (C) 2016  Red Hat, Inc.\n+#\n+# This copyrighted material is made available to anyone wishing to use,\n+# modify, copy, or redistribute it subject to the terms and conditions of\n+# the GNU General Public License v.2, or (at your option) any later version.\n+# This program is distributed in the hope that it will be useful, but WITHOUT\n+# ANY WARRANTY expressed or implied, including the implied warranties of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General\n+# Public License for more details.  You should have received a copy of the\n+# GNU General Public License along with this program; if not, write to the\n+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA\n+# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the\n+# source code or documentation are not subject to the GNU General Public\n+# License and may only be used or replicated with the express permission of\n+# Red Hat, Inc.\n+#\n+\n+\"\"\"Tests of the Yum compatible layer.\"\"\"\n+\n+from __future__ import unicode_literals\n+from tests.support import mock\n+import dnf.cli\n+import dnf.conf.config\n+import dnf.yum.option_parser\n+import dnf.yum.config\n+import dnf.yum.cli\n+import dnf.logging\n+import dnf.pycomp\n+import tests.support\n+\n+\n+def _parse(command, args):\n+    parser = dnf.yum.option_parser.YumOptionParser()\n+    return parser.parse_main_args(args), parser.parse_command_args(command, args)\n+\n+\n+def _compare_options(test, options):\n+    for option in options:\n+        test.assertNotEqual(test.conf._get_option(option),\n+                            test.dnf_conf._get_option(option),\n+                            option + \" is equal in yum and dnf config\")\n+\n+\n+class YumConfigTest(tests.support.TestCase):\n+    def setUp(self):\n+        self.conf = dnf.yum.config.YumConf()\n+        self.dnf_conf = dnf.conf.config.MainConf()\n+\n+    def test_different_options(self):\n+        self.assertNotEqual(self.conf, self.dnf_conf)\n+        _compare_options(self, ['exclude', 'config_file_path', 'plugins', 'pluginpath', 'pluginconfpath', 'persistdir',\n+                                'cachedir', 'system_cachedir', 'keepcache', 'installonly_limit', 'timeout',\n+                                'metadata_expire', 'best', 'clean_requirements_on_remove'])\n+\n+\n+class YumArgumentParserTest(tests.support.TestCase):\n+    def setUp(self):\n+        self.cli = mock.Mock()\n+        self.command = TestCommand(self.cli)\n+\n+    def test_skip_broken(self):\n+        arg_opts, command_opts = _parse(self.command, ['update', '--skip-broken'])\n+        self.assertEqual(command_opts.command, ['update'])\n+        self.assertIsNone(arg_opts.best)\n+\n+    def test_skip_broken_none(self):\n+        arg_opts, command_opts = _parse(self.command, ['update'])\n+        self.assertEqual(command_opts.command, ['update'])\n+        self.assertTrue(arg_opts.best)\n+\n+\n+class YumProvidesCommandTest(tests.support.TestCase):\n+    def setUp(self):\n+        self.cli = mock.Mock()\n+        self.command = dnf.cli.commands.ProvidesCommand(self.cli)\n+\n+    def test_provides_command(self):\n+        _parse(self.command, [u'provides', u'nf'])\n+        self.assertEqual(self.command.opts.dependency, [u'*nf*'])\n+\n+        _parse(self.command, [u'provides', u'nf*'])\n+        self.assertEqual(self.command.opts.dependency, [u'*nf*'])\n+\n+        _parse(self.command, [u'provides', u'*nf'])\n+        self.assertEqual(self.command.opts.dependency, [u'*nf*'])\n+\n+        _parse(self.command, [u'provides', u'*nf*'])\n+        self.assertEqual(self.command.opts.dependency, [u'*nf*'])\n+\n+\n+class YumCustomCommandTest(tests.support.TestCase):\n+    def setUp(self):\n+        self.conf = dnf.yum.config.YumConf()\n+        self.base = dnf.cli.cli.BaseCli(self.conf)\n+        self.cli = dnf.yum.cli.YumCli(self.base)\n+        self.command = TestCommand(self.cli)\n+\n+        self.cli.register_command(TestCommand)\n+        pass\n+\n+    def test_custom_command(self):\n+        args = [u'test-cmd']\n+        opts, _ = _parse(self.command, args)\n+        self.cli._parse_commands(opts, args)\n+\n+    def test_unknown_command(self):\n+        args = [u'unknown']\n+        opts, _ = _parse(self.command, args)\n+        try:\n+            self.cli._parse_commands(opts, args)\n+        except dnf.cli.CliError as e:","path":"tests/test_yumlayer.py","position":111,"original_position":111,"commit_id":"9d9df62baf67831b0970d09556fac5eafc01b9e1","original_commit_id":"9d9df62baf67831b0970d09556fac5eafc01b9e1","user":{"login":"dnf-bot","id":10563235,"avatar_url":"https://avatars.githubusercontent.com/u/10563235?v=3","gravatar_id":"","url":"https://api.github.com/users/dnf-bot","html_url":"https://github.com/dnf-bot","followers_url":"https://api.github.com/users/dnf-bot/followers","following_url":"https://api.github.com/users/dnf-bot/following{/other_user}","gists_url":"https://api.github.com/users/dnf-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/dnf-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnf-bot/subscriptions","organizations_url":"https://api.github.com/users/dnf-bot/orgs","repos_url":"https://api.github.com/users/dnf-bot/repos","events_url":"https://api.github.com/users/dnf-bot/events{/privacy}","received_events_url":"https://api.github.com/users/dnf-bot/received_events","type":"User","site_admin":false},"body":"__[flake8]__\n* [F841] local variable 'e' is assigned to but never used\n\n<!-- Comment by [SideCI](https://sideci.com) -->","created_at":"2016-10-24T08:53:13Z","updated_at":"2016-10-24T08:53:13Z","html_url":"https://github.com/rpm-software-management/dnf/pull/641#discussion_r84644100","pull_request_url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/641","_links":{"self":{"href":"https://api.github.com/repos/rpm-software-management/dnf/pulls/comments/84644100"},"html":{"href":"https://github.com/rpm-software-management/dnf/pull/641#discussion_r84644100"},"pull_request":{"href":"https://api.github.com/repos/rpm-software-management/dnf/pulls/641"}}},"pull_request":{"url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/641","id":90571644,"html_url":"https://github.com/rpm-software-management/dnf/pull/641","diff_url":"https://github.com/rpm-software-management/dnf/pull/641.diff","patch_url":"https://github.com/rpm-software-management/dnf/pull/641.patch","issue_url":"https://api.github.com/repos/rpm-software-management/dnf/issues/641","number":641,"state":"open","locked":false,"title":"Yum compatible layer","user":{"login":"mhatina","id":7964232,"avatar_url":"https://avatars.githubusercontent.com/u/7964232?v=3","gravatar_id":"","url":"https://api.github.com/users/mhatina","html_url":"https://github.com/mhatina","followers_url":"https://api.github.com/users/mhatina/followers","following_url":"https://api.github.com/users/mhatina/following{/other_user}","gists_url":"https://api.github.com/users/mhatina/gists{/gist_id}","starred_url":"https://api.github.com/users/mhatina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhatina/subscriptions","organizations_url":"https://api.github.com/users/mhatina/orgs","repos_url":"https://api.github.com/users/mhatina/repos","events_url":"https://api.github.com/users/mhatina/events{/privacy}","received_events_url":"https://api.github.com/users/mhatina/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-24T08:53:03Z","updated_at":"2016-10-24T08:53:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88aa41977bfd9117e8b687a2803b5856e2ed826b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/641/commits","review_comments_url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/641/comments","review_comment_url":"https://api.github.com/repos/rpm-software-management/dnf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rpm-software-management/dnf/issues/641/comments","statuses_url":"https://api.github.com/repos/rpm-software-management/dnf/statuses/9d9df62baf67831b0970d09556fac5eafc01b9e1","head":{"label":"mhatina:yum_compatible_layer","ref":"yum_compatible_layer","sha":"9d9df62baf67831b0970d09556fac5eafc01b9e1","user":{"login":"mhatina","id":7964232,"avatar_url":"https://avatars.githubusercontent.com/u/7964232?v=3","gravatar_id":"","url":"https://api.github.com/users/mhatina","html_url":"https://github.com/mhatina","followers_url":"https://api.github.com/users/mhatina/followers","following_url":"https://api.github.com/users/mhatina/following{/other_user}","gists_url":"https://api.github.com/users/mhatina/gists{/gist_id}","starred_url":"https://api.github.com/users/mhatina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhatina/subscriptions","organizations_url":"https://api.github.com/users/mhatina/orgs","repos_url":"https://api.github.com/users/mhatina/repos","events_url":"https://api.github.com/users/mhatina/events{/privacy}","received_events_url":"https://api.github.com/users/mhatina/received_events","type":"User","site_admin":false},"repo":{"id":67125793,"name":"dnf","full_name":"mhatina/dnf","owner":{"login":"mhatina","id":7964232,"avatar_url":"https://avatars.githubusercontent.com/u/7964232?v=3","gravatar_id":"","url":"https://api.github.com/users/mhatina","html_url":"https://github.com/mhatina","followers_url":"https://api.github.com/users/mhatina/followers","following_url":"https://api.github.com/users/mhatina/following{/other_user}","gists_url":"https://api.github.com/users/mhatina/gists{/gist_id}","starred_url":"https://api.github.com/users/mhatina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhatina/subscriptions","organizations_url":"https://api.github.com/users/mhatina/orgs","repos_url":"https://api.github.com/users/mhatina/repos","events_url":"https://api.github.com/users/mhatina/events{/privacy}","received_events_url":"https://api.github.com/users/mhatina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhatina/dnf","description":"dnf is a package manager based on yum and libsolv","fork":true,"url":"https://api.github.com/repos/mhatina/dnf","forks_url":"https://api.github.com/repos/mhatina/dnf/forks","keys_url":"https://api.github.com/repos/mhatina/dnf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhatina/dnf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhatina/dnf/teams","hooks_url":"https://api.github.com/repos/mhatina/dnf/hooks","issue_events_url":"https://api.github.com/repos/mhatina/dnf/issues/events{/number}","events_url":"https://api.github.com/repos/mhatina/dnf/events","assignees_url":"https://api.github.com/repos/mhatina/dnf/assignees{/user}","branches_url":"https://api.github.com/repos/mhatina/dnf/branches{/branch}","tags_url":"https://api.github.com/repos/mhatina/dnf/tags","blobs_url":"https://api.github.com/repos/mhatina/dnf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhatina/dnf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhatina/dnf/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhatina/dnf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhatina/dnf/statuses/{sha}","languages_url":"https://api.github.com/repos/mhatina/dnf/languages","stargazers_url":"https://api.github.com/repos/mhatina/dnf/stargazers","contributors_url":"https://api.github.com/repos/mhatina/dnf/contributors","subscribers_url":"https://api.github.com/repos/mhatina/dnf/subscribers","subscription_url":"https://api.github.com/repos/mhatina/dnf/subscription","commits_url":"https://api.github.com/repos/mhatina/dnf/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhatina/dnf/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhatina/dnf/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhatina/dnf/issues/comments{/number}","contents_url":"https://api.github.com/repos/mhatina/dnf/contents/{+path}","compare_url":"https://api.github.com/repos/mhatina/dnf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhatina/dnf/merges","archive_url":"https://api.github.com/repos/mhatina/dnf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhatina/dnf/downloads","issues_url":"https://api.github.com/repos/mhatina/dnf/issues{/number}","pulls_url":"https://api.github.com/repos/mhatina/dnf/pulls{/number}","milestones_url":"https://api.github.com/repos/mhatina/dnf/milestones{/number}","notifications_url":"https://api.github.com/repos/mhatina/dnf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhatina/dnf/labels{/name}","releases_url":"https://api.github.com/repos/mhatina/dnf/releases{/id}","deployments_url":"https://api.github.com/repos/mhatina/dnf/deployments","created_at":"2016-09-01T11:34:37Z","updated_at":"2016-09-01T11:34:39Z","pushed_at":"2016-10-24T08:50:35Z","git_url":"git://github.com/mhatina/dnf.git","ssh_url":"git@github.com:mhatina/dnf.git","clone_url":"https://github.com/mhatina/dnf.git","svn_url":"https://github.com/mhatina/dnf","homepage":"","size":37815,"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":"rpm-software-management:master","ref":"master","sha":"1d83fdc0280ca4202281ef489afe600e2f51a32a","user":{"login":"rpm-software-management","id":8504469,"avatar_url":"https://avatars.githubusercontent.com/u/8504469?v=3","gravatar_id":"","url":"https://api.github.com/users/rpm-software-management","html_url":"https://github.com/rpm-software-management","followers_url":"https://api.github.com/users/rpm-software-management/followers","following_url":"https://api.github.com/users/rpm-software-management/following{/other_user}","gists_url":"https://api.github.com/users/rpm-software-management/gists{/gist_id}","starred_url":"https://api.github.com/users/rpm-software-management/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpm-software-management/subscriptions","organizations_url":"https://api.github.com/users/rpm-software-management/orgs","repos_url":"https://api.github.com/users/rpm-software-management/repos","events_url":"https://api.github.com/users/rpm-software-management/events{/privacy}","received_events_url":"https://api.github.com/users/rpm-software-management/received_events","type":"Organization","site_admin":false},"repo":{"id":3671909,"name":"dnf","full_name":"rpm-software-management/dnf","owner":{"login":"rpm-software-management","id":8504469,"avatar_url":"https://avatars.githubusercontent.com/u/8504469?v=3","gravatar_id":"","url":"https://api.github.com/users/rpm-software-management","html_url":"https://github.com/rpm-software-management","followers_url":"https://api.github.com/users/rpm-software-management/followers","following_url":"https://api.github.com/users/rpm-software-management/following{/other_user}","gists_url":"https://api.github.com/users/rpm-software-management/gists{/gist_id}","starred_url":"https://api.github.com/users/rpm-software-management/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpm-software-management/subscriptions","organizations_url":"https://api.github.com/users/rpm-software-management/orgs","repos_url":"https://api.github.com/users/rpm-software-management/repos","events_url":"https://api.github.com/users/rpm-software-management/events{/privacy}","received_events_url":"https://api.github.com/users/rpm-software-management/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rpm-software-management/dnf","description":"dnf is a package manager based on yum and libsolv","fork":false,"url":"https://api.github.com/repos/rpm-software-management/dnf","forks_url":"https://api.github.com/repos/rpm-software-management/dnf/forks","keys_url":"https://api.github.com/repos/rpm-software-management/dnf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rpm-software-management/dnf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rpm-software-management/dnf/teams","hooks_url":"https://api.github.com/repos/rpm-software-management/dnf/hooks","issue_events_url":"https://api.github.com/repos/rpm-software-management/dnf/issues/events{/number}","events_url":"https://api.github.com/repos/rpm-software-management/dnf/events","assignees_url":"https://api.github.com/repos/rpm-software-management/dnf/assignees{/user}","branches_url":"https://api.github.com/repos/rpm-software-management/dnf/branches{/branch}","tags_url":"https://api.github.com/repos/rpm-software-management/dnf/tags","blobs_url":"https://api.github.com/repos/rpm-software-management/dnf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rpm-software-management/dnf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rpm-software-management/dnf/git/refs{/sha}","trees_url":"https://api.github.com/repos/rpm-software-management/dnf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rpm-software-management/dnf/statuses/{sha}","languages_url":"https://api.github.com/repos/rpm-software-management/dnf/languages","stargazers_url":"https://api.github.com/repos/rpm-software-management/dnf/stargazers","contributors_url":"https://api.github.com/repos/rpm-software-management/dnf/contributors","subscribers_url":"https://api.github.com/repos/rpm-software-management/dnf/subscribers","subscription_url":"https://api.github.com/repos/rpm-software-management/dnf/subscription","commits_url":"https://api.github.com/repos/rpm-software-management/dnf/commits{/sha}","git_commits_url":"https://api.github.com/repos/rpm-software-management/dnf/git/commits{/sha}","comments_url":"https://api.github.com/repos/rpm-software-management/dnf/comments{/number}","issue_comment_url":"https://api.github.com/repos/rpm-software-management/dnf/issues/comments{/number}","contents_url":"https://api.github.com/repos/rpm-software-management/dnf/contents/{+path}","compare_url":"https://api.github.com/repos/rpm-software-management/dnf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rpm-software-management/dnf/merges","archive_url":"https://api.github.com/repos/rpm-software-management/dnf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rpm-software-management/dnf/downloads","issues_url":"https://api.github.com/repos/rpm-software-management/dnf/issues{/number}","pulls_url":"https://api.github.com/repos/rpm-software-management/dnf/pulls{/number}","milestones_url":"https://api.github.com/repos/rpm-software-management/dnf/milestones{/number}","notifications_url":"https://api.github.com/repos/rpm-software-management/dnf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rpm-software-management/dnf/labels{/name}","releases_url":"https://api.github.com/repos/rpm-software-management/dnf/releases{/id}","deployments_url":"https://api.github.com/repos/rpm-software-management/dnf/deployments","created_at":"2012-03-09T15:31:09Z","updated_at":"2016-10-22T08:59:34Z","pushed_at":"2016-10-24T08:53:03Z","git_url":"git://github.com/rpm-software-management/dnf.git","ssh_url":"git@github.com:rpm-software-management/dnf.git","clone_url":"https://github.com/rpm-software-management/dnf.git","svn_url":"https://github.com/rpm-software-management/dnf","homepage":"","size":42932,"stargazers_count":347,"watchers_count":347,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":133,"mirror_url":null,"open_issues_count":19,"forks":133,"open_issues":19,"watchers":347,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rpm-software-management/dnf/pulls/641"},"html":{"href":"https://github.com/rpm-software-management/dnf/pull/641"},"issue":{"href":"https://api.github.com/repos/rpm-software-management/dnf/issues/641"},"comments":{"href":"https://api.github.com/repos/rpm-software-management/dnf/issues/641/comments"},"review_comments":{"href":"https://api.github.com/repos/rpm-software-management/dnf/pulls/641/comments"},"review_comment":{"href":"https://api.github.com/repos/rpm-software-management/dnf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rpm-software-management/dnf/pulls/641/commits"},"statuses":{"href":"https://api.github.com/repos/rpm-software-management/dnf/statuses/9d9df62baf67831b0970d09556fac5eafc01b9e1"}}}}
{"actor":{"display_login":"dnf-bot"}}