Ticket #32653: test-32653.diff

File test-32653.diff, 1.2 KB (added by Mariusz Felisiak, 4 years ago)
  • tests/backends/oracle/tests.py

    diff --git a/tests/backends/oracle/tests.py b/tests/backends/oracle/tests.py
    index 85d45805e0..a50f38dbe2 100644
    a b from django.db import DatabaseError, connection  
    44from django.db.models import BooleanField
    55from django.test import TransactionTestCase
    66
    7 from ..models import Square
     7from ..models import (
     8    Square, VeryLongModelNameZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ,
     9)
    810
    911
    1012@unittest.skipUnless(connection.vendor == 'oracle', 'Oracle tests')
    class Tests(unittest.TestCase):  
    1618        quoted_name = connection.ops.quote_name(name)
    1719        self.assertEqual(quoted_name % (), name)
    1820
     21    def test_quote_name_db_table(self):
     22        model = VeryLongModelNameZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
     23        db_table = model._meta.db_table.upper()
     24        self.assertEqual(f'"{db_table}"', connection.ops.quote_name(
     25            'backends_verylongmodelnamezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz',
     26        ))
     27
    1928    def test_dbms_session(self):
    2029        """A stored procedure can be called through a cursor wrapper."""
    2130        with connection.cursor() as cursor:
Back to Top