Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tableauserverclient/models/schedule_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Type:
Subscription = "Subscription"
DataAcceleration = "DataAcceleration"
ActiveDirectorySync = "ActiveDirectorySync"
System = "System"

class ExecutionOrder:
Parallel = "Parallel"
Expand Down
1 change: 1 addition & 0 deletions test/assets/schedule_get.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
<schedule id="c9cff7f9-309c-4361-99ff-d4ba8c9f5467" name="Weekday early mornings" state="Active" priority="50" createdAt="2016-07-06T20:19:00Z" updatedAt="2016-09-13T11:00:32Z" type="Extract" frequency="Weekly" nextRunAt="2016-09-14T11:00:00Z" />
<schedule id="bcb79d07-6e47-472f-8a65-d7f51f40c36c" name="Saturday night" state="Active" priority="80" createdAt="2016-07-07T20:19:00Z" updatedAt="2016-09-12T16:39:38Z" type="Subscription" frequency="Weekly" nextRunAt="2016-09-18T06:00:00Z" />
<schedule id="f456e8f2-aeb2-4a8e-b823-00b6f08640f0" name="First of the month 1:00AM" state="Active" priority="50" createdAt="2019-02-19T18:52:19Z" updatedAt="2019-02-19T18:55:51Z" type="Flow" frequency="Monthly" nextRunAt="2019-03-01T09:00:00Z"/>
<schedule id="3cfa4713-ce7c-4fa7-aa2e-f752bfc8dd04" name="First of the month 2:00AM" state="Active" priority="30" createdAt="2019-02-19T18:52:19Z" updatedAt="2019-02-19T18:55:51Z" type="System" frequency="Monthly" nextRunAt="2019-03-01T09:00:00Z"/>
</schedules>
</tsResponse>
10 changes: 10 additions & 0 deletions test/test_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def test_get(self) -> None:
extract = all_schedules[0]
subscription = all_schedules[1]
flow = all_schedules[2]
system = all_schedules[3]

self.assertEqual(2, pagination_item.total_available)
self.assertEqual("c9cff7f9-309c-4361-99ff-d4ba8c9f5467", extract.id)
Expand Down Expand Up @@ -79,6 +80,15 @@ def test_get(self) -> None:
self.assertEqual("Flow", flow.schedule_type)
self.assertEqual("2019-03-01T09:00:00Z", format_datetime(flow.next_run_at))

self.assertEqual("3cfa4713-ce7c-4fa7-aa2e-f752bfc8dd04", system.id)
self.assertEqual("First of the month 2:00AM", system.name)
self.assertEqual("Active", system.state)
self.assertEqual(30, system.priority)
self.assertEqual("2019-02-19T18:52:19Z", format_datetime(system.created_at))
self.assertEqual("2019-02-19T18:55:51Z", format_datetime(system.updated_at))
self.assertEqual("System", system.schedule_type)
self.assertEqual("2019-03-01T09:00:00Z", format_datetime(system.next_run_at))

def test_get_empty(self) -> None:
with open(GET_EMPTY_XML, "rb") as f:
response_xml = f.read().decode("utf-8")
Expand Down