]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Match tests have been completely wrong.
authorMichael Trier <mtrier@gmail.com>
Fri, 26 Feb 2010 08:50:04 +0000 (08:50 +0000)
committerMichael Trier <mtrier@gmail.com>
Fri, 26 Feb 2010 08:50:04 +0000 (08:50 +0000)
test/dialect/test_mssql.py
test/dialect/test_mysql.py
test/dialect/test_postgresql.py
test/dialect/test_sqlite.py

index b9c730e4668b5077dcdf1cfa8885fc39e13745eb..aa5ecf8cdcfe67b2714635510c6ee0e2ee5105ee 100644 (file)
@@ -555,7 +555,7 @@ class MatchTest(TestBase, AssertsCompiledSQL):
         matchtable.insert().execute([
             {'id': 1, 'title': 'Agile Web Development with Rails', 'category_id': 2},
             {'id': 2, 'title': 'Dive Into Python', 'category_id': 1},
-            {'id': 3, 'title': 'Programming Matz''s Ruby', 'category_id': 2},
+            {'id': 3, 'title': "Programming Matz's Ruby", 'category_id': 2},
             {'id': 4, 'title': 'The Definitive Guide to Django', 'category_id': 1},
             {'id': 5, 'title': 'Python in a Nutshell', 'category_id': 1}
         ])
@@ -576,7 +576,7 @@ class MatchTest(TestBase, AssertsCompiledSQL):
         eq_([2, 5], [r.id for r in results])
 
     def test_simple_match_with_apostrophe(self):
-        results = matchtable.select().where(matchtable.c.title.match('"Matz''s"')).execute().fetchall()
+        results = matchtable.select().where(matchtable.c.title.match("Matz's")).execute().fetchall()
         eq_([3], [r.id for r in results])
 
     def test_simple_prefix_match(self):
index 11e0d77a44ffe8bc0ed53ab167c8c994ea859e4b..23a85b6bb95e06dc679adcfc6a386a9688214085 100644 (file)
@@ -1261,7 +1261,7 @@ class MatchTest(TestBase, AssertsCompiledSQL):
              'title': 'Dive Into Python',
              'category_id': 1},
             {'id': 3,
-             'title': 'Programming Matz''s Ruby',
+             'title': "Programming Matz's Ruby",
              'category_id': 2},
             {'id': 4,
              'title': 'The Definitive Guide to Django',
@@ -1302,7 +1302,7 @@ class MatchTest(TestBase, AssertsCompiledSQL):
 
     def test_simple_match_with_apostrophe(self):
         results = (matchtable.select().
-                   where(matchtable.c.title.match('"Matz''s"')).
+                   where(matchtable.c.title.match("Matz's")).
                    execute().
                    fetchall())
         eq_([3], [r.id for r in results])
index 60022e18a58f8f5c6815969d7b4e92c83f54499a..9982821c07c1a9025f84a94e49831b135a649dc0 100644 (file)
@@ -1641,7 +1641,7 @@ class MatchTest(TestBase, AssertsCompiledSQL):
         matchtable.insert().execute([
             {'id': 1, 'title': 'Agile Web Development with Rails', 'category_id': 2},
             {'id': 2, 'title': 'Dive Into Python', 'category_id': 1},
-            {'id': 3, 'title': 'Programming Matz''s Ruby', 'category_id': 2},
+            {'id': 3, 'title': "Programming Matz's Ruby", 'category_id': 2},
             {'id': 4, 'title': 'The Definitive Guide to Django', 'category_id': 1},
             {'id': 5, 'title': 'Python in a Nutshell', 'category_id': 1}
         ])
@@ -1666,7 +1666,7 @@ class MatchTest(TestBase, AssertsCompiledSQL):
         eq_([2, 5], [r.id for r in results])
 
     def test_simple_match_with_apostrophe(self):
-        results = matchtable.select().where(matchtable.c.title.match("Matz''s")).execute().fetchall()
+        results = matchtable.select().where(matchtable.c.title.match("Matz's")).execute().fetchall()
         eq_([3], [r.id for r in results])
 
     def test_simple_derivative_match(self):
index 7b428404cb7d7341afcd7c1c2f27e94fd2b59513..bb08fe34113ad054161e828ea3714702c7631ea6 100644 (file)
@@ -516,7 +516,7 @@ class MatchTest(TestBase, AssertsCompiledSQL):
         matchtable.insert().execute([
             {'id': 1, 'title': 'Agile Web Development with Rails', 'category_id': 2},
             {'id': 2, 'title': 'Dive Into Python', 'category_id': 1},
-            {'id': 3, 'title': 'Programming Matz''s Ruby', 'category_id': 2},
+            {'id': 3, 'title': "Programming Matz's Ruby", 'category_id': 2},
             {'id': 4, 'title': 'The Definitive Guide to Django', 'category_id': 1},
             {'id': 5, 'title': 'Python in a Nutshell', 'category_id': 1}
         ])