|
9 | 9 |
|
10 | 10 | def test_push_with_batch(): |
11 | 11 | push_source = PushSource( |
12 | | - name="test", |
13 | | - schema=[Field(name="f1", dtype=Float32), Field(name="f2", dtype=Bool)], |
14 | | - timestamp_field="event_timestamp", |
15 | | - batch_source=BigQuerySource(table="test.test"), |
| 12 | + name="test", batch_source=BigQuerySource(table="test.test"), |
16 | 13 | ) |
17 | 14 | push_source_proto = push_source.to_proto() |
18 | 15 | assert push_source_proto.HasField("batch_source") |
19 | | - assert push_source_proto.timestamp_field is not None |
20 | | - assert push_source_proto.push_options is not None |
21 | 16 |
|
22 | 17 | push_source_unproto = PushSource.from_proto(push_source_proto) |
23 | 18 |
|
@@ -51,28 +46,17 @@ def test_request_source_primitive_type_to_proto(): |
51 | 46 |
|
52 | 47 | def test_hash(): |
53 | 48 | push_source_1 = PushSource( |
54 | | - name="test", |
55 | | - schema=[Field(name="f1", dtype=Float32), Field(name="f2", dtype=Bool)], |
56 | | - timestamp_field="event_timestamp", |
57 | | - batch_source=BigQuerySource(table="test.test"), |
| 49 | + name="test", batch_source=BigQuerySource(table="test.test"), |
58 | 50 | ) |
59 | 51 | push_source_2 = PushSource( |
60 | | - name="test", |
61 | | - schema=[Field(name="f1", dtype=Float32), Field(name="f2", dtype=Bool)], |
62 | | - timestamp_field="event_timestamp", |
63 | | - batch_source=BigQuerySource(table="test.test"), |
| 52 | + name="test", batch_source=BigQuerySource(table="test.test"), |
64 | 53 | ) |
65 | 54 | push_source_3 = PushSource( |
66 | | - name="test", |
67 | | - schema=[Field(name="f1", dtype=Float32)], |
68 | | - timestamp_field="event_timestamp", |
69 | | - batch_source=BigQuerySource(table="test.test"), |
| 55 | + name="test", batch_source=BigQuerySource(table="test.test2"), |
70 | 56 | ) |
71 | 57 | push_source_4 = PushSource( |
72 | 58 | name="test", |
73 | | - schema=[Field(name="f1", dtype=Float32)], |
74 | | - timestamp_field="event_timestamp", |
75 | | - batch_source=BigQuerySource(table="test.test"), |
| 59 | + batch_source=BigQuerySource(table="test.test2"), |
76 | 60 | description="test", |
77 | 61 | ) |
78 | 62 |
|
|
0 commit comments