Re: Preparing for 2.2LTS - testing for Deprecation Warnings

2019-01-17 Thread Dan Davis
I will then try like this in my manage.py: if len(sys.argv)>1 and sys.argv[1] = 'test': warnings.filterwarnings(...) Thanks, -Dan On Thu, Jan 17, 2019 at 1:08 PM Simon Charette wrote: > You can use the category kwarg of filterwarnings[0] to pass the Django > deprecation > warni

Re: Preparing for 2.2LTS - testing for Deprecation Warnings

2019-01-17 Thread Simon Charette
You can use the category kwarg of filterwarnings[0] to pass the Django deprecation warning classes. They can be found in the django.utils.deprecation module. (e.g. RemovedInDjango30Warning). Cheers, Simon [0] https://docs.python.org/3/library/warnings.html?highlight=filterwarnings#warnings.fi