diff options
| author | Marc Tamlyn <marc.tamlyn@gmail.com> | 2015-06-05 12:31:44 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-03-02 14:41:56 -0500 |
| commit | 8ddc79a7991685b9463b4f4db43fc4c064bc49f8 (patch) | |
| tree | 5edc9b85ec7ab1df1a30d210b061f20afd59adaa /tests | |
| parent | 04240b23658f8935bbfebacccc23b5e47a1d6c22 (diff) | |
Fixed #26285 -- Deprecated the MySQL-specific __search lookup.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lookup/models.py | 1 | ||||
| -rw-r--r-- | tests/lookup/tests.py | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/lookup/models.py b/tests/lookup/models.py index b8e47ec746..57389e90de 100644 --- a/tests/lookup/models.py +++ b/tests/lookup/models.py @@ -79,6 +79,7 @@ class Player(models.Model): # is only available when using MySQL 5.6, or when using MyISAM # tables. As 5.6 isn't common yet, lets use MyISAM table for # testing. The table is manually created by the test method. +# RemovedInDjango20Warning class MyISAMArticle(models.Model): headline = models.CharField(max_length=100) diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py index aba6588ac8..d2df291388 100644 --- a/tests/lookup/tests.py +++ b/tests/lookup/tests.py @@ -7,7 +7,10 @@ from unittest import skipUnless from django.core.exceptions import FieldError from django.db import connection -from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature +from django.test import ( + TestCase, TransactionTestCase, ignore_warnings, skipUnlessDBFeature, +) +from django.utils.deprecation import RemovedInDjango20Warning from .models import Article, Author, Game, MyISAMArticle, Player, Season, Tag @@ -792,6 +795,7 @@ class LookupTests(TestCase): class LookupTransactionTests(TransactionTestCase): available_apps = ['lookup'] + @ignore_warnings(category=RemovedInDjango20Warning) @skipUnless(connection.vendor == 'mysql', 'requires MySQL') def test_mysql_lookup_search(self): # To use fulltext indexes on MySQL either version 5.6 is needed, or one must use |
