File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -338,12 +338,15 @@ def test_use_default_org(self):
338338 def test_write_empty_data (self ):
339339 bucket = self .create_test_bucket ()
340340
341- with self .assertRaises (ApiException ) as cm :
342- self .write_client .write (bucket .name , record = "" )
343- exception = cm .exception
344-
345- self .assertEqual (400 , exception .status )
346- self .assertEqual ("Bad Request" , exception .reason )
341+ from distutils .version import LooseVersion
342+ version = self .client .health ().version
343+ if version != 'nightly' and LooseVersion (version ) <= LooseVersion ("2.0.8" ):
344+ with self .assertRaises (ApiException ) as cm :
345+ self .write_client .write (bucket .name , record = "" )
346+ exception = cm .exception
347+
348+ self .assertEqual (400 , exception .status )
349+ self .assertEqual ("Bad Request" , exception .reason )
347350
348351 result = self .query_api .query (
349352 "from(bucket:\" " + bucket .name + "\" ) |> range(start: 1970-01-01T00:00:00.000000001Z) |> last()" , self .org )
You can’t perform that action at this time.
0 commit comments