fix(5544): python str.startswith in examples

- startsWith should be startswith for Python
- The test should have failed; the callbacks don't seem to be working now.
pull/5544/head
Jason Stirnaman 2024-07-31 17:18:47 -05:00
parent d56076fc5b
commit 5614600c6c
2 changed files with 6 additions and 6 deletions

View File

@ -254,16 +254,16 @@ status = None
# Define callbacks for write responses
def success(self, data: str):
status = "Success writing batch: data: {data}"
assert status.startsWith('Success'), f"Expected {status} to be success"
assert status.startswith('Success'), f"Expected {status} to be success"
def error(self, data: str, err: InfluxDBError):
status = f"Error writing batch: config: {self}, data: {data}, error: {err}"
assert status.startsWith('Success'), f"Expected {status} to be success"
assert status.startswith('Success'), f"Expected {status} to be success"
def retry(self, data: str, err: InfluxDBError):
status = f"Retry error writing batch: config: {self}, data: {data}, error: {err}"
assert status.startsWith('Success'), f"Expected {status} to be success"
assert status.startswith('Success'), f"Expected {status} to be success"
# Instantiate WriteOptions for batching
write_options = WriteOptions()

View File

@ -282,16 +282,16 @@ status = None
# Define callbacks for write responses
def success(self, data: str):
status = "Success writing batch: data: {data}"
assert status.startsWith('Success'), f"Expected {status} to be success"
assert status.startswith('Success'), f"Expected {status} to be success"
def error(self, data: str, err: InfluxDBError):
status = f"Error writing batch: config: {self}, data: {data}, error: {err}"
assert status.startsWith('Success'), f"Expected {status} to be success"
assert status.startswith('Success'), f"Expected {status} to be success"
def retry(self, data: str, err: InfluxDBError):
status = f"Retry error writing batch: config: {self}, data: {data}, error: {err}"
assert status.startsWith('Success'), f"Expected {status} to be success"
assert status.startswith('Success'), f"Expected {status} to be success"
# Instantiate WriteOptions for batching
write_options = WriteOptions()