diff --git a/test/test_datasource.py b/test/test_datasource.py index 7f4cca75..56eb11ab 100644 --- a/test/test_datasource.py +++ b/test/test_datasource.py @@ -895,7 +895,8 @@ def test_publish_description(server: TSC.Server) -> None: ds_elem = body.find(".//datasource") assert ds_elem is not None assert ds_elem.attrib["description"] == "Sample description" - + + def test_get_datasource_no_owner(server: TSC.Server) -> None: with requests_mock.mock() as m: m.get(server.datasources.baseurl, text=GET_NO_OWNER.read_text()) diff --git a/test/test_workbook_model.py b/test/test_workbook_model.py index fc642356..3d6f31a7 100644 --- a/test/test_workbook_model.py +++ b/test/test_workbook_model.py @@ -1,13 +1,12 @@ -import unittest +import pytest import tableauserverclient as TSC -class WorkbookModelTests(unittest.TestCase): - def test_invalid_show_tabs(self): - workbook = TSC.WorkbookItem("10") - with self.assertRaises(ValueError): - workbook.show_tabs = "Hello" +def test_invalid_show_tabs(): + workbook = TSC.WorkbookItem("10") + with pytest.raises(ValueError): + workbook.show_tabs = "Hello" - with self.assertRaises(ValueError): - workbook.show_tabs = None + with pytest.raises(ValueError): + workbook.show_tabs = None