changeset 832d0ad3bc8f in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=832d0ad3bc8f
description:
Convert read column into proper type with SQLite
As SQLite has few basic types, we must use column names cast parsing to
ensure
to read values in proper type.
issue9652
review310801004
diffstat:
tests/scenario_stock_product_quantities_by_warehouse.rst | 20 ++++++++--------
1 files changed, 10 insertions(+), 10 deletions(-)
diffs (31 lines):
diff -r 86cac34d1084 -r 832d0ad3bc8f
tests/scenario_stock_product_quantities_by_warehouse.rst
--- a/tests/scenario_stock_product_quantities_by_warehouse.rst Mon Oct 19
00:17:20 2020 +0200
+++ b/tests/scenario_stock_product_quantities_by_warehouse.rst Wed Oct 21
23:11:13 2020 +0200
@@ -114,17 +114,17 @@
>>> len(records)
4
>>> if backend.name != 'sqlite':
- ... [(str(r.date), r.cumulative_quantity_start, r.quantity,
r.cumulative_quantity_end)
+ ... [(r.date, r.cumulative_quantity_start, r.quantity,
r.cumulative_quantity_end)
... for r in records] == [
- ... (str(yesterday), 0, 10, 10),
- ... (str(tomorrow), 10, -6, 4),
- ... (str(tomorrow), 4, 5, 9),
- ... (str(tomorrow), 9, -3, 6)]
+ ... (yesterday, 0, 10, 10),
+ ... (tomorrow, 10, -6, 4),
+ ... (tomorrow, 4, 5, 9),
+ ... (tomorrow, 9, -3, 6)]
... else:
- ... [(str(r.date), r.cumulative_quantity_start, r.quantity,
r.cumulative_quantity_end)
+ ... [(r.date, r.cumulative_quantity_start, r.quantity,
r.cumulative_quantity_end)
... for r in records] == [
- ... (str(yesterday), 0, 10, 0),
- ... (str(tomorrow), 10, -6, 10),
- ... (str(tomorrow), 10, 5, 10),
- ... (str(tomorrow), 10, -3, 10)]
+ ... (yesterday, 0, 10, 0),
+ ... (tomorrow, 10, -6, 10),
+ ... (tomorrow, 10, 5, 10),
+ ... (tomorrow, 10, -3, 10)]
True