File: test_ui.py

package info (click to toggle)
reportbug 13.2.0
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,248 kB
  • sloc: python: 9,838; sh: 70; makefile: 41; lisp: 31
file content (18 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
""" Unit test for reportbug.ui module """

import unittest

from reportbug import ui
from reportbug.ui import __LOADED_UIS as LOADED_UIS


class TestUI(unittest.TestCase):

    def test_ui(self):
        self.assertCountEqual(ui.AVAILABLE_UIS, ['text', 'urwid', 'gtk'])

    def test_getUI(self):
        for loaded_ui in list(LOADED_UIS.keys()):
            self.assertEqual(ui.getUI(loaded_ui), LOADED_UIS[loaded_ui])

        self.assertEqual(ui.getUI('non-existing'), LOADED_UIS['text'])