Skip to content

Commit 3219c9d

Browse files
authored
Fix test warnings (#1893)
* test: eliminate pytest warnings * docs: escape request filter examples
1 parent cb50383 commit 3219c9d

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎tableauserverclient/server/request_options.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,10 @@ def vf(self, name: str, value: str) -> Self:
378378
in August 2026. Examples below give the wire form (what the
379379
server sees after URL decoding) and the data value it matches.
380380
To match a value containing a literal comma, wire form
381-
``Rock\, Paper\, Scissors`` matches data value ``Rock, Paper,
381+
``Rock\\, Paper\\, Scissors`` matches data value ``Rock, Paper,
382382
Scissors`` (without escaping, the comma starts an OR-list). To
383-
match a literal backslash, double it: wire form ``C:\\temp\\file``
384-
matches data value ``C:\temp\file``.
383+
match a literal backslash, double it: wire form ``C:\\\\temp\\\\file``
384+
matches data value ``C:\\temp\\file``.
385385
- **Empty value** (``vf_<name>=``) is observed to override any
386386
workbook-embedded filter on that column, effectively widening it
387387
to all values. Not officially documented; behavior may change

‎test/test_datasource.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,8 @@ def test_synchronous_publish_timeout_error(server) -> None:
987987

988988

989989
def test_async_publish_timeout_error(server) -> None:
990+
server.version = "3.0"
991+
990992
with requests_mock.mock() as m:
991993
m.register_uri("POST", server.datasources.baseurl, status_code=504)
992994

‎test/test_site.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def test_update_missing_id(server: TSC.Server) -> None:
205205
server.sites.update(single_site)
206206

207207

208+
@pytest.mark.filterwarnings("ignore:FlowsEnabled has been removed")
208209
def test_update_subscription_email_and_footer_preserve_case() -> None:
209210
# Regression for #1849: RequestFactory used to .lower() customSubscriptionEmail
210211
# and customSubscriptionFooter, silently mangling caller intent. Footer
@@ -221,6 +222,7 @@ def test_update_subscription_email_and_footer_preserve_case() -> None:
221222
)
222223

223224

225+
@pytest.mark.filterwarnings("ignore:FlowsEnabled has been removed")
224226
def test_create_subscription_email_and_footer_preserve_case() -> None:
225227
# Same regression for the create-site path.
226228
site = TSC.SiteItem(name="X", content_url="x")
@@ -348,7 +350,7 @@ def test_parsing_attr_capture(capture):
348350

349351

350352
@pytest.mark.filterwarnings("ignore:FlowsEnabled has been removed")
351-
@pytest.mark.parametrize("req, capture", product(["create_req", "update_req"], [True, False, None]))
353+
@pytest.mark.parametrize("req, capture", list(product(["create_req", "update_req"], [True, False, None])))
352354
def test_encoding_attr_capture(req, capture):
353355
site = TSC.SiteItem(
354356
content_url="test",

‎test/test_workbook.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,8 @@ def test_synchronous_publish_timeout_error(server: TSC.Server) -> None:
938938

939939

940940
def test_async_publish_timeout_error(server: TSC.Server) -> None:
941+
server.version = "3.0"
942+
941943
with requests_mock.mock() as m:
942944
m.register_uri("POST", server.workbooks.baseurl, status_code=504)
943945

0 commit comments

Comments
 (0)