summaryrefslogtreecommitdiff
path: root/tests/string_lookup
diff options
context:
space:
mode:
authorErik Romijn <eromijn@solidlinks.nl>2013-05-19 13:28:09 +0200
committerErik Romijn <eromijn@solidlinks.nl>2013-05-19 13:28:09 +0200
commit60d94c2a80a68861021526c0fef7fc40e648e81f (patch)
tree0f5a275a384d3c3ad31f9363e7508234d5a7bb36 /tests/string_lookup
parent56d6fdbbf50b29bd162fd5ab3296a25127d7af65 (diff)
Fixed #11442 -- Postgresql backend casts all inet types to text
Diffstat (limited to 'tests/string_lookup')
-rw-r--r--tests/string_lookup/tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/string_lookup/tests.py b/tests/string_lookup/tests.py
index 02f766adce..b011720ddf 100644
--- a/tests/string_lookup/tests.py
+++ b/tests/string_lookup/tests.py
@@ -73,9 +73,11 @@ class StringLookupTests(TestCase):
"""
Regression test for #708
- "like" queries on IP address fields require casting to text (on PostgreSQL).
+ "like" queries on IP address fields require casting with HOST() (on PostgreSQL).
"""
a = Article(name='IP test', text='The body', submitted_from='192.0.2.100')
a.save()
self.assertEqual(repr(Article.objects.filter(submitted_from__contains='192.0.2')),
repr([a]))
+ # Test that the searches do not match the subnet mask (/32 in this case)
+ self.assertEqual(Article.objects.filter(submitted_from__contains='32').count(), 0) \ No newline at end of file