File tree 2 files changed +15
-1
lines changed 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ class CloudOnlyWarning(UserWarning):
37
37
@staticmethod
38
38
def print_warning (api_name : str , doc_url : str ):
39
39
"""Print warning about availability only on the InfluxDB Cloud."""
40
-
41
40
message = f"""The '{ api_name } ' is available only on the InfluxDB Cloud.
42
41
43
42
For more info see:
Original file line number Diff line number Diff line change
1
+ import unittest
2
+
3
+ import pytest
4
+
5
+ from influxdb_client import InfluxDBClient , BucketSchemasService
6
+ from influxdb_client .client .warnings import CloudOnlyWarning
7
+
8
+
9
+ class PointWarnings (unittest .TestCase ):
10
+
11
+ def test_cloud_only_warning (self ):
12
+ with pytest .warns (CloudOnlyWarning ) as warnings :
13
+ with InfluxDBClient (url = "http://localhost:8086" , token = "my-token" , org = "my-org" ) as client :
14
+ BucketSchemasService (api_client = client .api_client )
15
+ self .assertEqual (1 , len (warnings ))
You can’t perform that action at this time.
0 commit comments