8000 Add support for Python 3.8 · rshide/server-client-python@b2b08d3 · GitHub
[go: up one dir, main page]

Skip to content

Commit b2b08d3

Browse files
bcantoniRickey Shideler
authored and
Rickey Shideler
committed
Add support for Python 3.8
Only test_publish_with_hidden_view() needed changes because the order of attributes in the XML request body were swapped for some reason in 3.8 compared to prior Pythons.
1 parent 83accbd commit b2b08d3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ python:
44
- "3.5"
55
- "3.6"
66
- "3.7"
7+
- "3.8"
78
# command to install dependencies
89
install:
910
- "pip install -e ."

test/test_workbook.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#%%
33
import unittest
44
import os
5+
import re
56
import requests_mock
67
import tableauserverclient as TSC
78
import xml.etree.ElementTree as ET
@@ -461,8 +462,8 @@ def test_publish_with_hidden_view(self):
461462
hidden_views=['GDP per capita'])
462463

463464
request_body = m._adapter.request_history[0]._request.body
464-
self.assertIn(
465-
b'<views><view hidden="true" name="GDP per capita" /></views>', request_body)
465+
self.assertTrue(re.search(rb'<views><view.*?hidden=\"true\".*?\/><\/views>', request_body))
466+
self.assertTrue(re.search(rb'<views><view.*?name=\"GDP per capita\".*?\/><\/views>', request_body))
466467

467468
def test_publish_async(self):
468469
self.server.version = '3.0'

0 commit comments

Comments
 (0)
0