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}
])
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):
'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',
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])
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}
])
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):
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}
])