File: test_ui.py

package info (click to toggle)
reportbug 7.1.7%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,152 kB
  • sloc: python: 8,593; sh: 51; makefile: 43; lisp: 31
file content (19 lines) | stat: -rw-r--r-- 521 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
""" Unit test for reportbug.ui module """

import unittest

from reportbug import utils
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', 'gtk2'])

    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'])