diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/indexes/tests.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/indexes/tests.py b/tests/indexes/tests.py index 7eb5dd89a9..8f3c032641 100644 --- a/tests/indexes/tests.py +++ b/tests/indexes/tests.py @@ -108,7 +108,7 @@ class PartialIndexConditionIgnoredTests(TransactionTestCase): editor.add_index(Article, index) self.assertNotIn( - 'WHERE %s.%s' % (editor.quote_name(Article._meta.db_table), 'published'), + 'WHERE %s' % editor.quote_name('published'), str(index.create_sql(Article, editor)) ) @@ -260,7 +260,7 @@ class PartialIndexTests(TransactionTestCase): ) ) self.assertIn( - 'WHERE %s.%s' % (editor.quote_name(Article._meta.db_table), editor.quote_name("pub_date")), + 'WHERE %s' % editor.quote_name('pub_date'), str(index.create_sql(Article, schema_editor=editor)) ) editor.add_index(index=index, model=Article) @@ -277,7 +277,7 @@ class PartialIndexTests(TransactionTestCase): condition=Q(pk__gt=1), ) self.assertIn( - 'WHERE %s.%s' % (editor.quote_name(Article._meta.db_table), editor.quote_name('id')), + 'WHERE %s' % editor.quote_name('id'), str(index.create_sql(Article, schema_editor=editor)) ) editor.add_index(index=index, model=Article) @@ -294,7 +294,7 @@ class PartialIndexTests(TransactionTestCase): condition=Q(published=True), ) self.assertIn( - 'WHERE %s.%s' % (editor.quote_name(Article._meta.db_table), editor.quote_name('published')), + 'WHERE %s' % editor.quote_name('published'), str(index.create_sql(Article, schema_editor=editor)) ) editor.add_index(index=index, model=Article) @@ -321,7 +321,7 @@ class PartialIndexTests(TransactionTestCase): sql = str(index.create_sql(Article, schema_editor=editor)) where = sql.find('WHERE') self.assertIn( - 'WHERE (%s.%s' % (editor.quote_name(Article._meta.db_table), editor.quote_name("pub_date")), + 'WHERE (%s' % editor.quote_name('pub_date'), sql ) # Because each backend has different syntax for the operators, @@ -341,7 +341,7 @@ class PartialIndexTests(TransactionTestCase): condition=Q(pub_date__isnull=False), ) self.assertIn( - 'WHERE %s.%s IS NOT NULL' % (editor.quote_name(Article._meta.db_table), editor.quote_name("pub_date")), + 'WHERE %s IS NOT NULL' % editor.quote_name('pub_date'), str(index.create_sql(Article, schema_editor=editor)) ) editor.add_index(index=index, model=Article) |
