Files @ 99917555c27f
Branch filter:

Location: rattail-project/rattail/tests/filemon/test_util.py

Lance Edgar
update changelog

from unittest import TestCase

from rattail.filemon import util


class TestRaiseException(TestCase):

    def test_exception_is_raised_and_has_correct_message(self):
        path = u'fake_path'
        self.assertRaises(Exception, util.raise_exception, path)
        try:
            util.raise_exception(path, message=u"This is my custom message")
        except Exception as error:
            self.assertEqual(unicode(error), u"This is my custom message: fake_path")