File: test_exception.py

package info (click to toggle)
reportbug 6.6.3%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 1,380 kB
  • sloc: python: 8,496; sh: 51; makefile: 40; lisp: 31
file content (47 lines) | stat: -rw-r--r-- 1,548 bytes parent folder | download | duplicates (3)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from __future__ import with_statement

import unittest2

from reportbug import exceptions

class TestExceptions(unittest2.TestCase):

    def test_raises_reportbug_exception(self):
        with self.assertRaises(exceptions.reportbug_exception):
            raise exceptions.reportbug_exception

    def test_raises_reportbug_ui_exception(self):
        with self.assertRaises(exceptions.reportbug_ui_exception):
            raise exceptions.reportbug_ui_exception

    def test_raises_UINotImportable(self):
        with self.assertRaises(exceptions.UINotImportable):
            raise exceptions.UINotImportable

    def test_raises_NoPackage(self):
        with self.assertRaises(exceptions.NoPackage):
            raise exceptions.NoPackage

    def test_raises_NoBugs(self):
        with self.assertRaises(exceptions.NoBugs):
            raise exceptions.NoBugs

    def test_raises_NoReport(self):
        with self.assertRaises(exceptions.NoReport):
            raise exceptions.NoReport

    def test_raises_UINotImplemented(self):
        with self.assertRaises(exceptions.UINotImplemented):
            raise exceptions.UINotImplemented

    def test_raises_NoNetwork(self):
        with self.assertRaises(exceptions.NoNetwork):
            raise exceptions.NoNetwork

    def test_raises_InvalidRegex(self):
        with self.assertRaises(exceptions.InvalidRegex):
            raise exceptions.InvalidRegex

    def test_raises_NoMessage(self):
        with self.assertRaises(exceptions.NoMessage):
            raise exceptions.NoMessage