]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
extra unicode tests
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 15 May 2006 16:44:38 +0000 (16:44 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 15 May 2006 16:44:38 +0000 (16:44 +0000)
added 'threaded' keyword argument to oracle.py (pretty important....)

lib/sqlalchemy/databases/oracle.py
test/testtypes.py

index 863cfd03e8dd3893084cd228cbd31cdb963e8b04..16c6cb2181ca573dff4babdf99076493e8189f7f 100644 (file)
@@ -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:
index 2fb41cc7943a9fa5212b2b6126a411c38723c602..ae58f0f543fc4542e472fda30bc046e35cb88007 100644 (file)
@@ -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')