diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-05-19 04:57:10 -0700 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-05-19 04:57:10 -0700 |
| commit | f7467181aa56e30c946ff55190c49792d6e9a72f (patch) | |
| tree | 81b02f95f65fefcafecfdf2686ba9e687755ec95 /tests | |
| parent | 3d5a546254b357ad27d5465700945e2bc472c3bc (diff) | |
| parent | 60d94c2a80a68861021526c0fef7fc40e648e81f (diff) | |
Merge pull request #1160 from erikr/host-inet-postgres2
Fixed #11442 -- Postgresql backend casts all inet types to text
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/string_lookup/tests.py | 4 |
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 |
