rattail/tests/test_exceptions.py
Lance Edgar 3b00bd5b28 Move tests out of the installed package set
this seems to be better practice.  from what i can tell this is a
clean move with no breakage..  and built package files no longer seem
to include test modules
2021-12-30 21:03:23 -06:00

24 lines
700 B
Python

# -*- coding: utf-8; -*-
from __future__ import unicode_literals, absolute_import
import unittest
import six
from rattail import exceptions
class TestRecipientsNotFound(unittest.TestCase):
def test_init(self):
self.assertRaises(TypeError, exceptions.RecipientsNotFound)
exc = exceptions.RecipientsNotFound('testing')
self.assertEqual(exc.key, 'testing')
def test_unicode(self):
exc = exceptions.RecipientsNotFound('testing')
self.assertEqual(six.text_type(exc),
"No recipients found in config for 'testing' emails. Please set "
"'testing.to' (or 'default.to') in the [rattail.mail] section.")