1 2 3 4 5 6 7 8 9
import warnings from django.test import TestCase class DummyTest(TestCase): def test_warn(self): warnings.warn("warning from test", DeprecationWarning)