|
5 | 5 |
|
6 | 6 | import tableauserverclient as TSC |
7 | 7 | from tableauserverclient.datetime_helpers import parse_datetime |
8 | | -from ._utils import read_xml_asset |
9 | 8 |
|
10 | 9 | TEST_ASSET_DIR = Path(__file__).parent / "assets" |
11 | 10 |
|
@@ -45,25 +44,12 @@ def test_get(server: TSC.Server, user: TSC.UserItem) -> None: |
45 | 44 | assert len(user.favorites["projects"]) == 1 |
46 | 45 | assert len(user.favorites["datasources"]) == 1 |
47 | 46 |
|
48 | | - collection = self.user.favorites["collections"][0] |
49 | | - |
50 | | - assert collection.id == "8c57cb8a-d65f-4a32-813e-5a3f86e8f94e" |
51 | | - assert collection.name == "sample collection" |
52 | | - assert collection.description == "description for sample collection" |
53 | | - assert collection.total_item_count == 3 |
54 | | - assert collection.permissioned_item_count == 2 |
55 | | - assert collection.visibility == "Private" |
56 | | - assert collection.created_at == parse_datetime("2016-08-11T21:22:40Z") |
57 | | - assert collection.updated_at == parse_datetime("2016-08-11T21:34:17Z") |
58 | | - |
59 | | - def test_add_favorite_workbook(self) -> None: |
60 | | - response_xml = read_xml_asset(ADD_FAVORITE_WORKBOOK_XML) |
61 | | - workbook = TSC.WorkbookItem("") |
62 | | - workbook._id = "6d13b0ca-043d-4d42-8c9d-3f3313ea3a00" |
63 | | - workbook.name = "Superstore" |
64 | | - with requests_mock.mock() as m: |
65 | | - m.put(f"{self.baseurl}/{self.user.id}", text=response_xml) |
66 | | - self.server.favorites.add_favorite_workbook(self.user, workbook) |
| 47 | + workbook = user.favorites["workbooks"][0] |
| 48 | + print("favorited: ") |
| 49 | + print(workbook) |
| 50 | + view = user.favorites["views"][0] |
| 51 | + datasource = user.favorites["datasources"][0] |
| 52 | + project = user.favorites["projects"][0] |
67 | 53 |
|
68 | 54 | assert workbook.id == "6d13b0ca-043d-4d42-8c9d-3f3313ea3a00" |
69 | 55 | assert view.id == "d79634e1-6063-4ec9-95ff-50acbf609ff5" |
|
0 commit comments