File: test_dnf_cli.py

package info (click to toggle)
dnf 4.24.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,820 kB
  • sloc: python: 27,723; xml: 771; sh: 131; makefile: 35
file content (29 lines) | stat: -rw-r--r-- 713 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- coding: utf-8 -*-


from __future__ import absolute_import
from __future__ import unicode_literals

import dnf
import dnf.cli
import dnf.exceptions

from .common import TestCase


class DnfCliInitApiTest(TestCase):
    def test_cli_error(self):
        # dnf.cli.CliError
        self.assertHasAttr(dnf.cli, "CliError")
        ex = dnf.cli.CliError(value=None)
        self.assertHasType(ex, dnf.exceptions.Error)

    def test_cli(self):
        # dnf.cli.Cli
        self.assertHasAttr(dnf.cli, "Cli")
        self.assertHasType(dnf.cli.Cli, object)

    def test_command(self):
        # dnf.cli.Command
        self.assertHasAttr(dnf.cli, "Command")
        self.assertHasType(dnf.cli.Command, object)