def test_special_values_write(sync_client): point = utils.random_point() point['tags']['boolean_tag'] = True point['tags']['none_tag'] = None point['tags']['blank_tag'] = '' point['fields']['boolean_field'] = False point['fields']['none_field'] = None point['measurement'] = '"quo⚡️es and emoji"' with pytest.warns(UserWarning) as e: assert sync_client.write(point) logger.warning(e)
def test_invalid_query_pattern_without_name(sync_client): with pytest.raises(ValueError) as e: sync_client.set_query_pattern('SELECT {foo} from {bar}') logger.warning(e)
def test_invalid_query_pattern_name(sync_client): with pytest.warns(UserWarning) as e: sync_client.set_query_pattern(write='SELECT {foo} from {bar}') logger.warning(e)
def test_invalid_query_pattern(sync_client): with pytest.warns(UserWarning) as e: sync_client.set_query_pattern(my_query='SELECT {q} from {epoch}') logger.warning(e)