2323from influxdb import InfluxDBClient
2424from influxdb .exceptions import InfluxDBClientError
2525
26- from influxdb .tests import skipIfPYpy , using_pypy , skipServerTests
26+ from influxdb .tests import skip_if_pypy , using_pypy , skip_server_tests
2727from influxdb .tests .server_tests .base import ManyTestCasesWithServerMixin
2828from influxdb .tests .server_tests .base import SingleTestCaseWithServerMixin
2929
@@ -82,15 +82,15 @@ def point(series_name, timestamp=None, tags=None, **fields):
8282]
8383
8484if not using_pypy :
85- dummy_pointDF = {
85+ dummy_point_df = {
8686 "measurement" : "cpu_load_short" ,
8787 "tags" : {"host" : "server01" ,
8888 "region" : "us-west" },
8989 "dataframe" : pd .DataFrame (
9090 [[0.64 ]], columns = ['value' ],
9191 index = pd .to_datetime (["2009-11-10T23:00:00Z" ]))
9292 }
93- dummy_pointsDF = [{
93+ dummy_points_df = [{
9494 "measurement" : "cpu_load_short" ,
9595 "tags" : {"host" : "server01" , "region" : "us-west" },
9696 "dataframe" : pd .DataFrame (
@@ -120,7 +120,7 @@ def point(series_name, timestamp=None, tags=None, **fields):
120120]
121121
122122
123- @skipServerTests
123+ @skip_server_tests
124124class SimpleTests (SingleTestCaseWithServerMixin , unittest .TestCase ):
125125 """Define the class of simple tests."""
126126
@@ -267,7 +267,7 @@ def test_invalid_port_fails(self):
267267 InfluxDBClient ('host' , '80/redir' , 'username' , 'password' )
268268
269269
270- @skipServerTests
270+ @skip_server_tests
271271class CommonTests (ManyTestCasesWithServerMixin , unittest .TestCase ):
272272 """Define a class to handle common tests for the server."""
273273
@@ -293,15 +293,15 @@ def test_write_points(self):
293293 """Test writing points to the server."""
294294 self .assertIs (True , self .cli .write_points (dummy_point ))
295295
296- @skipIfPYpy
296+ @skip_if_pypy
297297 def test_write_points_DF (self ):
298298 """Test writing points with dataframe."""
299299 self .assertIs (
300300 True ,
301301 self .cliDF .write_points (
302- dummy_pointDF ['dataframe' ],
303- dummy_pointDF ['measurement' ],
304- dummy_pointDF ['tags' ]
302+ dummy_point_df ['dataframe' ],
303+ dummy_point_df ['measurement' ],
304+ dummy_point_df ['tags' ]
305305 )
306306 )
307307
@@ -342,7 +342,7 @@ def test_write_points_check_read_DF(self):
342342 rsp = self .cliDF .query ('SELECT * FROM cpu_load_short' )
343343 assert_frame_equal (
344344 rsp ['cpu_load_short' ],
345- dummy_pointDF ['dataframe' ]
345+ dummy_point_df ['dataframe' ]
346346 )
347347
348348 # Query with Tags
@@ -351,7 +351,7 @@ def test_write_points_check_read_DF(self):
351351 assert_frame_equal (
352352 rsp [('cpu_load_short' ,
353353 (('host' , 'server01' ), ('region' , 'us-west' )))],
354- dummy_pointDF ['dataframe' ]
354+ dummy_point_df ['dataframe' ]
355355 )
356356
357357 def test_write_multiple_points_different_series (self ):
@@ -407,21 +407,21 @@ def test_write_multiple_points_different_series_DF(self):
407407 for i in range (2 ):
408408 self .assertIs (
409409 True , self .cliDF .write_points (
410- dummy_pointsDF [i ]['dataframe' ],
411- dummy_pointsDF [i ]['measurement' ],
412- dummy_pointsDF [i ]['tags' ]))
410+ dummy_points_df [i ]['dataframe' ],
411+ dummy_points_df [i ]['measurement' ],
412+ dummy_points_df [i ]['tags' ]))
413413 time .sleep (1 )
414414 rsp = self .cliDF .query ('SELECT * FROM cpu_load_short' )
415415
416416 assert_frame_equal (
417417 rsp ['cpu_load_short' ],
418- dummy_pointsDF [0 ]['dataframe' ]
418+ dummy_points_df [0 ]['dataframe' ]
419419 )
420420
421421 rsp = self .cliDF .query ('SELECT * FROM memory' )
422422 assert_frame_equal (
423423 rsp ['memory' ],
424- dummy_pointsDF [1 ]['dataframe' ]
424+ dummy_points_df [1 ]['dataframe' ]
425425 )
426426
427427 def test_write_points_batch (self ):
@@ -786,7 +786,7 @@ def test_query_multiple_series(self):
786786 self .cli .write_points (pts )
787787
788788
789- @skipServerTests
789+ @skip_server_tests
790790class UdpTests (ManyTestCasesWithServerMixin , unittest .TestCase ):
791791 """Define a class to test UDP series."""
792792
0 commit comments