aboutsummaryrefslogtreecommitdiff
path: root/backend/tests
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2023-01-04 15:58:18 +1100
committerTerry Truong <terry06890@gmail.com>2023-01-04 15:58:18 +1100
commit472fa9c1f11a3c16e10541ce8b9de44a6dadeeec (patch)
treed41f9b44fc40f61747e1b02463ef8c405ef5c93c /backend/tests
parenta6a3616042414eb3c18611eaca58cbcc62c86eaa (diff)
Add 'unit' column to event_disp table
Use 'unit' to narrow search of 'event_disp' values Simplify SQL queries to use 'unit' instead of 'start' and 'fmt' Fix minor HistDate documentation error
Diffstat (limited to 'backend/tests')
-rw-r--r--backend/tests/test_gen_disp_data.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/backend/tests/test_gen_disp_data.py b/backend/tests/test_gen_disp_data.py
index db6ddc0..792a9b2 100644
--- a/backend/tests/test_gen_disp_data.py
+++ b/backend/tests/test_gen_disp_data.py
@@ -93,27 +93,27 @@ class TestGenData(unittest.TestCase):
}
)
self.assertEqual(
- readTestDbTable(dbFile, 'SELECT id, scale FROM event_disp'),
+ readTestDbTable(dbFile, 'SELECT id, scale, unit FROM event_disp'),
{
- (5, 10),
- (7, 10),
- (2, 10),
- (5, 1),
- (7, 1),
- (4, 1),
- (2, 1),
- (1, MONTH_SCALE),
- (7, MONTH_SCALE),
- (4, MONTH_SCALE),
- (5, MONTH_SCALE),
- (11, MONTH_SCALE),
- (2, MONTH_SCALE),
- (1, DAY_SCALE),
- (7, DAY_SCALE),
- (6, DAY_SCALE),
- (4, DAY_SCALE),
- (5, DAY_SCALE),
- (11, DAY_SCALE),
- (2, DAY_SCALE),
+ (5, 10, 190),
+ (7, 10, 190),
+ (2, 10, 200),
+ (5, 1, 1900),
+ (7, 1, 1900),
+ (4, 1, 1901),
+ (2, 1, 2002),
+ (1, MONTH_SCALE, 2415021),
+ (7, MONTH_SCALE, 2415021),
+ (4, MONTH_SCALE, 2415386),
+ (5, MONTH_SCALE, 2415307),
+ (11, MONTH_SCALE, 2415307),
+ (2, MONTH_SCALE, 2452593),
+ (1, DAY_SCALE, 2415021),
+ (7, DAY_SCALE, 2415021),
+ (6, DAY_SCALE, 2415030),
+ (4, DAY_SCALE, 2415386),
+ (5, DAY_SCALE, 2415307),
+ (11, DAY_SCALE, 2415307),
+ (2, DAY_SCALE, 2452607),
}
)