From 00b607ded6ca168b44a12632794ddd221a28e369 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 15 May 2006 16:44:38 +0000 Subject: [PATCH] extra unicode tests added 'threaded' keyword argument to oracle.py (pretty important....) --- lib/sqlalchemy/databases/oracle.py | 3 ++- test/testtypes.py | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/sqlalchemy/databases/oracle.py b/lib/sqlalchemy/databases/oracle.py index 863cfd03e8..16c6cb2181 100644 --- a/lib/sqlalchemy/databases/oracle.py +++ b/lib/sqlalchemy/databases/oracle.py @@ -106,9 +106,10 @@ def descriptor(): ]} class OracleSQLEngine(ansisql.ANSISQLEngine): - def __init__(self, opts, use_ansi = True, module = None, **params): + def __init__(self, opts, use_ansi = True, module = None, threaded=False, **params): self._use_ansi = use_ansi self.opts = self._translate_connect_args((None, 'dsn', 'user', 'password'), opts) + self.opts['threaded'] = threaded if module is None: self.module = cx_Oracle else: diff --git a/test/testtypes.py b/test/testtypes.py index 2fb41cc794..ae58f0f543 100644 --- a/test/testtypes.py +++ b/test/testtypes.py @@ -130,6 +130,13 @@ class UnicodeTest(AssertMixin): unicode_table.create() def tearDownAll(self): unicode_table.drop() + def testwhereclause(self): + l = unicode_table.select(unicode_table.c.unicode_data==u'this is also unicode').execute() + def testmapperwhere(self): + class Foo(object):pass + m = mapper(Foo, unicode_table) + l = m.get_by(unicode_data=unicode('this is also unicode')) + l = m.get_by(plain_data=unicode('this is also unicode')) def testbasic(self): rawdata = 'Alors vous imaginez ma surprise, au lever du jour, quand une dr\xc3\xb4le de petit voix m\xe2\x80\x99a r\xc3\xa9veill\xc3\xa9. Elle disait: \xc2\xab S\xe2\x80\x99il vous pla\xc3\xaet\xe2\x80\xa6 dessine-moi un mouton! \xc2\xbb\n' unicodedata = rawdata.decode('utf-8') -- 2.47.2