@@ -121,58 +121,12 @@ def test_simple_analitycs_query(self):
121
121
122
122
def test_empty_query (self ):
123
123
client = self .create_client ()
124
- result = client .create_query ()
125
- query_id = result .get ("id" )
126
-
127
- wait_for_query_status (client , query_id , ["FAILED" ])
128
- query_json = client .get_query (query_id )
129
- assert normalize_json (query_json ) == {
130
- "id" : "xxxxxxxxxxxxxxxxxxxx" ,
131
- "name" : "" ,
132
- "description" : "" ,
133
- "text" : "" ,
134
- "type" : "ANALYTICS" ,
135
- "status" : "FAILED" ,
136
- "issues" : {
137
- "message" : "{ <main>: Error: Query failed with code ABORTED at ISOTIME subissue: "
138
- "{ <main>: Error: Failed to parse query subissue: "
139
- "{ <main>: Error: Parse Sql subissue: "
140
- "{ <main>:1:0: Error: Unexpected token absence : cannot match to any predicted input... "
141
- "} } } }" ,
142
- "details" : [
143
- {
144
- "message" : "Query failed with code ABORTED at ISOTIME" ,
145
- "severity" : "ERROR" ,
146
- "issues" : [
147
- {
148
- "message" : "Failed to parse query" ,
149
- "severity" : "ERROR" ,
150
- "issues" : [
151
- {
152
- "message" : "Parse Sql" ,
153
- "severity" : "ERROR" ,
154
- "issues" : [
155
- {
156
- "position" : {"row" : 1 },
157
- "message" : "Unexpected token absence : cannot match to any predicted input...\u000a " ,
158
- "end_position" : {"row" : 1 },
159
- "severity" : "ERROR" ,
160
- "issues" : []
161
- }
162
- ]
163
- }
164
- ]
165
- }
166
- ]
167
- }
168
- ]
169
- },
170
- "meta" : {
171
- "finished_at" : "ISOTIME" ,
172
- "started_at" : "ISOTIME"
173
- },
174
- "result_sets" : []
175
- }
124
+ try :
125
+ result = client .create_query ()
126
+ except Exception as e :
127
+ assert "\" message\" :\" text\' s length is not in [1; 102400]" in e .args [0 ]
128
+ return
129
+ assert False
176
130
177
131
def test_warning (self ):
178
132
client = self .create_client ()
0 commit comments