0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Reset warnings before testing warnings

This commit is contained in:
Tim Heap 2016-04-04 12:19:59 +10:00 committed by Karl Hobley
parent a6e53abd34
commit a48ae09ce9

View File

@ -11,6 +11,8 @@ from wagtail.utils.deprecation import RemovedInWagtail17Warning, SearchFieldsSho
class TestThisShouldBeAList(SimpleTestCase):
def test_add_a_list(self):
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter('always')
base = SearchFieldsShouldBeAList(['hello'])
result = base + ['world']
@ -23,6 +25,8 @@ class TestThisShouldBeAList(SimpleTestCase):
def test_add_a_tuple(self):
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter('always')
base = SearchFieldsShouldBeAList(['hello'])
result = base + ('world',)