@@ -45,7 +45,12 @@ def test_round_trip(self):
45
45
46
46
# insert dummy data
47
47
self .cur .execute (f'''
48
- insert into covidcast values
48
+ INSERT INTO
49
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
50
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
51
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
52
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
53
+ VALUES
49
54
(0, 'src', 'sig', 'day', 'county', 20200414, '01234',
50
55
123, 1.5, 2.5, 3.5, 456, 4, 20200414, 0, 1, False,
51
56
{ Nans .NOT_MISSING } , { Nans .NOT_MISSING } , { Nans .NOT_MISSING } )
@@ -92,7 +97,12 @@ def test_round_trip(self):
92
97
93
98
# # insert dummy data
94
99
# self.cur.execute(f'''
95
- # insert into covidcast values
100
+ # INSERT INTO
101
+ # `covidcast` (`id`, `source`, `signal`, `time_type`,
102
+ # `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
103
+ # `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
104
+ # `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
105
+ # VALUES
96
106
# (0, 'src', 'sig', 'day', 'county', 20200414, '01234',
97
107
# 123, 1.5, 2.5, 3.5, 456, 4, 20200414, 0, 1, False,
98
108
# {Nans.NOT_MISSING}, {Nans.NOT_MISSING}, {Nans.NOT_MISSING})
@@ -129,7 +139,12 @@ def test_csv_format(self):
129
139
130
140
# insert dummy data
131
141
self .cur .execute (f'''
132
- insert into covidcast values
142
+ INSERT INTO
143
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
144
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
145
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
146
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
147
+ VALUES
133
148
(0, 'src', 'sig', 'day', 'county', 20200414, '01234',
134
149
123, 1.5, 2.5, 3.5, 456, 4, 20200414, 0, 1, False,
135
150
{ Nans .NOT_MISSING } , { Nans .NOT_MISSING } , { Nans .NOT_MISSING } )
@@ -163,7 +178,12 @@ def test_raw_json_format(self):
163
178
164
179
# insert dummy data
165
180
self .cur .execute (f'''
166
- insert into covidcast values
181
+ INSERT INTO
182
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
183
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
184
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
185
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
186
+ VALUES
167
187
(0, 'src', 'sig', 'day', 'county', 20200414, '01234',
168
188
123, 1.5, 2.5, 3.5, 456, 4, 20200414, 0, 1, False,
169
189
{ Nans .NOT_MISSING } , { Nans .NOT_MISSING } , { Nans .NOT_MISSING } )
@@ -205,7 +225,12 @@ def test_fields(self):
205
225
206
226
# insert dummy data
207
227
self .cur .execute (f'''
208
- insert into covidcast values
228
+ INSERT INTO
229
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
230
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
231
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
232
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
233
+ VALUES
209
234
(0, 'src', 'sig', 'day', 'county', 20200414, '01234',
210
235
123, 1.5, 2.5, 3.5, 456, 4, 20200414, 0, 1, False,
211
236
{ Nans .NOT_MISSING } , { Nans .NOT_MISSING } , { Nans .NOT_MISSING } )
@@ -326,7 +351,12 @@ def test_location_wildcard(self):
326
351
327
352
# insert dummy data
328
353
self .cur .execute (f'''
329
- insert into covidcast values
354
+ INSERT INTO
355
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
356
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
357
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
358
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
359
+ VALUES
330
360
(0, 'src', 'sig', 'day', 'county', 20200414, '11111',
331
361
123, 10, 11, 12, 456, 13, 20200414, 0, 1, False,
332
362
{ Nans .NOT_MISSING } , { Nans .NOT_MISSING } , { Nans .NOT_MISSING } ),
@@ -414,7 +444,12 @@ def test_geo_value(self):
414
444
415
445
# insert dummy data
416
446
self .cur .execute (f'''
417
- insert into covidcast values
447
+ INSERT INTO
448
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
449
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
450
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
451
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
452
+ VALUES
418
453
(0, 'src', 'sig', 'day', 'county', 20200414, '11111',
419
454
123, 10, 11, 12, 456, 13, 20200414, 0, 1, False,
420
455
{ Nans .NOT_MISSING } , { Nans .NOT_MISSING } , { Nans .NOT_MISSING } ),
@@ -530,7 +565,12 @@ def test_location_timeline(self):
530
565
531
566
# insert dummy data
532
567
self .cur .execute (f'''
533
- insert into covidcast values
568
+ INSERT INTO
569
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
570
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
571
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
572
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
573
+ VALUES
534
574
(0, 'src', 'sig', 'day', 'county', 20200411, '01234',
535
575
123, 10, 11, 12, 456, 13, 20200413, 2, 1, False,
536
576
{ Nans .NOT_MISSING } , { Nans .NOT_MISSING } , { Nans .NOT_MISSING } ),
@@ -618,7 +658,12 @@ def test_unique_key_constraint(self):
618
658
619
659
# insert dummy data
620
660
self .cur .execute (f'''
621
- insert into covidcast values
661
+ INSERT INTO
662
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
663
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
664
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
665
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
666
+ VALUES
622
667
(0, 'src', 'sig', 'day', 'county', 20200414, '01234',
623
668
0, 0, 0, 0, 0, 0, 20200414, 0, 1, False,
624
669
{ Nans .NOT_MISSING } , { Nans .NOT_MISSING } , { Nans .NOT_MISSING } )
@@ -628,15 +673,25 @@ def test_unique_key_constraint(self):
628
673
# fail to insert different dummy data under the same key
629
674
with self .assertRaises (mysql .connector .errors .IntegrityError ):
630
675
self .cur .execute (f'''
631
- insert into covidcast values
676
+ INSERT INTO
677
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
678
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
679
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
680
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
681
+ VALUES
632
682
(0, 'src', 'sig', 'day', 'county', 20200414, '01234',
633
683
1, 1, 1, 1, 1, 1, 20200414, 0, 1, False,
634
684
{ Nans .NOT_MISSING } , { Nans .NOT_MISSING } , { Nans .NOT_MISSING } )
635
685
''' )
636
686
637
687
# succeed to insert different dummy data under a different issue
638
688
self .cur .execute (f'''
639
- insert into covidcast values
689
+ INSERT INTO
690
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
691
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
692
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
693
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
694
+ VALUES
640
695
(0, 'src', 'sig', 'day', 'county', 20200414, '01234',
641
696
1, 1, 1, 1, 1, 1, 20200415, 1, 1, False,
642
697
{ Nans .NOT_MISSING } , { Nans .NOT_MISSING } , { Nans .NOT_MISSING } )
@@ -647,7 +702,12 @@ def test_nullable_columns(self):
647
702
648
703
# insert dummy data
649
704
self .cur .execute (f'''
650
- insert into covidcast values
705
+ INSERT INTO
706
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
707
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
708
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
709
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
710
+ VALUES
651
711
(0, 'src', 'sig', 'day', 'county', 20200414, '01234',
652
712
123, 0.123, NULL, NULL, 456, NULL, 20200414, 0, 1, False,
653
713
{ Nans .NOT_MISSING } , { Nans .OTHER } , { Nans .OTHER } )
@@ -693,7 +753,12 @@ def test_temporal_partitioning(self):
693
753
694
754
# insert dummy data
695
755
self .cur .execute (f'''
696
- insert into covidcast values
756
+ INSERT INTO
757
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
758
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
759
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
760
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
761
+ VALUES
697
762
(0, 'src', 'sig', 'hour', 'state', 2020041714, 'vi',
698
763
123, 10, 11, 12, 456, 13, 2020041714, 0, 1, False,
699
764
{ Nans .NOT_MISSING } , { Nans .NOT_MISSING } , { Nans .NOT_MISSING } ),
@@ -750,7 +815,12 @@ def test_date_formats(self):
750
815
751
816
# insert dummy data
752
817
self .cur .execute (f'''
753
- insert into covidcast values
818
+ INSERT INTO
819
+ `covidcast` (`id`, `source`, `signal`, `time_type`,
820
+ `geo_type`, `time_value`, `geo_value`, `value_updated_timestamp`,
821
+ `value`, `stderr`, `sample_size`, `direction_updated_timestamp`,
822
+ `direction`, `issue`, `lag`, `is_latest_issue`, `is_wip`)
823
+ VALUES
754
824
(0, 'src', 'sig', 'day', 'county', 20200411, '01234',
755
825
123, 10, 11, 12, 456, 13, 20200413, 0, 1, False,
756
826
{ Nans .NOT_MISSING } , { Nans .NOT_MISSING } , { Nans .NOT_MISSING } ),
0 commit comments