summaryrefslogtreecommitdiff
path: root/tests/lookup/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lookup/tests.py')
-rw-r--r--tests/lookup/tests.py32
1 files changed, 2 insertions, 30 deletions
diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py
index 1c8dd986fc..78e68dfc4a 100644
--- a/tests/lookup/tests.py
+++ b/tests/lookup/tests.py
@@ -3,16 +3,11 @@ from __future__ import unicode_literals
import collections
from datetime import datetime
from operator import attrgetter
-from unittest import skipUnless
from django.core.exceptions import FieldError
-from django.db import connection
-from django.test import (
- TestCase, TransactionTestCase, ignore_warnings, skipUnlessDBFeature,
-)
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.test import TestCase, skipUnlessDBFeature
-from .models import Article, Author, Game, MyISAMArticle, Player, Season, Tag
+from .models import Article, Author, Game, Player, Season, Tag
class LookupTests(TestCase):
@@ -775,26 +770,3 @@ class LookupTests(TestCase):
'<Article: Article 7>'],
ordered=False
)
-
-
-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
- # MyISAM tables. Neither of these combinations is currently available on CI, so
- # lets manually create a MyISAM table for Article model.
- with connection.cursor() as cursor:
- cursor.execute(
- "CREATE TEMPORARY TABLE myisam_article ("
- " id INTEGER PRIMARY KEY AUTO_INCREMENT, "
- " headline VARCHAR(100) NOT NULL "
- ") ENGINE MYISAM")
- dr = MyISAMArticle.objects.create(headline='Django Reinhardt')
- MyISAMArticle.objects.create(headline='Ringo Star')
- # NOTE: Needs to be created after the article has been saved.
- cursor.execute(
- 'CREATE FULLTEXT INDEX myisam_article_ft ON myisam_article (headline)')
- self.assertSequenceEqual(MyISAMArticle.objects.filter(headline__search='Reinhardt'), [dr])