Skip to content

Commit f0481fc

Browse files
vchavatapalliVineeth Sai Surya Chavatapalli
authored andcommitted
Fix merge conflict markers and missing imports in tests
- Resolved remaining conflict markers in test_datasource.py and test_workbook.py - Added missing imports for read_xml_assets and asset from _utils - All black formatting checks now pass - All mypy type checks now pass These fixes ensure CI passes on macOS, Ubuntu, and Windows.
1 parent 354dc94 commit f0481fc

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

test/test_datasource.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from tableauserverclient.server.endpoint.exceptions import InternalServerError
1717
from tableauserverclient.server.endpoint.fileuploads_endpoint import Fileuploads
1818
from tableauserverclient.server.request_factory import RequestFactory
19+
from ._utils import asset, read_xml_asset, read_xml_assets
1920

2021
TEST_ASSET_DIR = Path(__file__).parent / "assets"
2122

@@ -160,8 +161,6 @@ def test_update_copy_fields(server) -> None:
160161
assert single_datasource.tags == updated_datasource.tags
161162
assert single_datasource._project_name == updated_datasource._project_name
162163

163-
164-
<<<<<<< HEAD
165164
def test_update_connections(self) -> None:
166165
populate_xml, response_xml = read_xml_assets(POPULATE_CONNECTIONS_XML, UPDATE_CONNECTIONS_XML)
167166

@@ -243,7 +242,8 @@ def test_populate_permissions(self) -> None:
243242
m.get(self.baseurl + "/0448d2ed-590d-4fa0-b272-a2a8a24555b5/permissions", text=response_xml)
244243
single_datasource = TSC.DatasourceItem("1d0304cd-3796-429f-b815-7258370b9b74", "test")
245244
single_datasource._id = "0448d2ed-590d-4fa0-b272-a2a8a24555b5"
246-
=======
245+
246+
247247
def test_update_tags(server) -> None:
248248
add_tags_xml = ADD_TAGS_XML.read_text()
249249
update_xml = UPDATE_XML.read_text()
@@ -257,7 +257,6 @@ def test_update_tags(server) -> None:
257257
single_datasource._initial_tags.update(["a", "b", "c", "d"])
258258
single_datasource.tags.update(["a", "c", "e"])
259259
updated_datasource = server.datasources.update(single_datasource)
260-
>>>>>>> d4b27f42d897883f8b8d0cb5b7edb558df2cbfb6
261260

262261
assert single_datasource.tags == updated_datasource.tags
263262
assert single_datasource._initial_tags == updated_datasource._initial_tags

test/test_workbook.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from tableauserverclient.models import UserItem, GroupItem, PermissionsRule
1414
from tableauserverclient.server.endpoint.exceptions import InternalServerError, UnsupportedAttributeError
1515
from tableauserverclient.server.request_factory import RequestFactory
16+
from ._utils import asset, read_xml_asset, read_xml_assets
1617

1718
TEST_ASSET_DIR = Path(__file__).parent / "assets"
1819

@@ -707,8 +708,6 @@ def test_publish_with_thumbnails_user_id(server: TSC.Server) -> None:
707708
# order of attributes in xml is unspecified
708709
assert re.search(b'thumbnailsUserId=\\"ee8c6e70-43b6-11e6-af4f-f7b0d8e20761\\"', request_body)
709710

710-
711-
<<<<<<< HEAD
712711
def test_update_workbook_connections(self) -> None:
713712
populate_xml, response_xml = read_xml_assets(POPULATE_CONNECTIONS_XML, UPDATE_CONNECTIONS_XML)
714713

@@ -778,12 +777,12 @@ def test_update_workbook_connections_without_auth_type(self) -> None:
778777
def test_get_workbook_all_fields(self) -> None:
779778
self.server.version = "3.21"
780779
baseurl = self.server.workbooks.baseurl
781-
=======
780+
781+
782782
def test_publish_with_thumbnails_group_id(server: TSC.Server) -> None:
783783
response_xml = PUBLISH_XML.read_text()
784784
with requests_mock.mock() as m:
785785
m.post(server.workbooks.baseurl, text=response_xml)
786-
>>>>>>> d4b27f42d897883f8b8d0cb5b7edb558df2cbfb6
787786

788787
new_workbook = TSC.WorkbookItem(
789788
name="Sample",

0 commit comments

Comments
 (0)