summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_functional.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils_tests/test_functional.py')
-rw-r--r--tests/utils_tests/test_functional.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/utils_tests/test_functional.py b/tests/utils_tests/test_functional.py
index 595479a503..b870f98ea2 100644
--- a/tests/utils_tests/test_functional.py
+++ b/tests/utils_tests/test_functional.py
@@ -224,6 +224,12 @@ class FunctionalTests(SimpleTestCase):
lazified()
mocked.assert_not_called()
+ def test_lazy_bytes_and_str_result_classes(self):
+ lazy_obj = lazy(lambda: 'test', str, bytes)
+ msg = 'Cannot call lazy() with both bytes and text return types.'
+ with self.assertRaisesMessage(ValueError, msg):
+ lazy_obj()
+
def test_classproperty_getter(self):
class Foo:
foo_attr = 123