Merge "Remove AutoString* in ndb.py"

This commit is contained in:
Jenkins 2017-09-05 14:27:32 +00:00 committed by Gerrit Code Review
commit 69910499a7
2 changed files with 0 additions and 37 deletions

View File

@ -15,14 +15,10 @@
import re
import debtcollector.removals
from oslo_db.sqlalchemy.compat import utils as compat_utils
from oslo_db.sqlalchemy.types import String
from sqlalchemy import event, schema
from sqlalchemy.dialects.mysql import TEXT
from sqlalchemy.dialects.mysql import TINYTEXT
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.types import String as _String
from sqlalchemy.types import to_instance
@ -112,18 +108,3 @@ def _compile_ndb_string(element, compiler, **kw):
return compiler.process(effective_type, **kw)
else:
return compiler.visit_string(element, **kw)
@debtcollector.removals.remove
def AutoStringTinyText(length, **kw):
return String(length, mysql_ndb_type=TINYTEXT, *kw)
@debtcollector.removals.remove
def AutoStringText(length, **kw):
return String(length, mysql_ndb_type=TEXT, **kw)
@debtcollector.removals.remove
def AutoStringSize(length, ndb_size, **kw):
return String(length, mysql_ndb_length=ndb_size, **kw)

View File

@ -111,24 +111,6 @@ class NDBEventTestCase(NDBMockTestBase):
class NDBDatatypesTestCase(NDBMockTestBase):
def test_ndb_deprecated_autostringtinytext(self):
test_engine = self.test_engine
self.assertEqual("TINYTEXT",
str(ndb.AutoStringTinyText(255).compile(
dialect=test_engine.dialect)))
def test_ndb_deprecated_autostringtext(self):
test_engine = self.test_engine
self.assertEqual("TEXT",
str(ndb.AutoStringText(4096).compile(
dialect=test_engine.dialect)))
def test_ndb_deprecated_autostringsize(self):
test_engine = self.test_engine
self.assertEqual('VARCHAR(64)',
str(ndb.AutoStringSize(255, 64).compile(
dialect=test_engine.dialect)))
def test_ndb_string_to_tinytext(self):
test_engine = self.test_engine
self.assertEqual("TINYTEXT",