1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #21429 -- Added SimpleTestCase.assertNoLogs() on Python < 3.10.

This commit is contained in:
François Freitag
2021-01-07 17:54:40 +01:00
committed by Mariusz Felisiak
parent d3ecef26b9
commit 7ca7f4495b
9 changed files with 82 additions and 19 deletions

View File

@@ -427,9 +427,8 @@ class GeoLookupTest(TestCase):
def test_wkt_string_in_lookup(self):
# Valid WKT strings don't emit error logs.
with self.assertRaisesMessage(AssertionError, 'no logs'):
with self.assertLogs('django.contrib.gis', 'ERROR'):
State.objects.filter(poly__intersects='LINESTRING(0 0, 1 1, 5 5)')
with self.assertNoLogs('django.contrib.gis', 'ERROR'):
State.objects.filter(poly__intersects='LINESTRING(0 0, 1 1, 5 5)')
@skipUnlessDBFeature("supports_relate_lookup")
def test_relate_lookup(self):