

def test_deprecated_allow_lazy(self):
    with self.assertRaises(RemovedInDjango20Warning):

        def noop_text(text):
            return force_text(text)
        noop_text = allow_lazy(noop_text, six.text_type)
        rendered = noop_text(ugettext_lazy('I am a text'))
        self.assertEqual(type(rendered), six.text_type)
        self.assertEqual(rendered, 'I am a text')

dataset/ETHPy150Open django/django/tests/decorators/tests.py DecoratorsTest.test_deprecated_allow_lazy/original