FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
document-api-python/test/test_workbook.py at development · tableau/document-api-python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
tableau
/
document-api-python
Public
Notifications
You must be signed in to change notification settings
Fork
184
Star
363
Code
Issues
56
Pull requests
4
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
document-api-python
/
test
/
test_workbook.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
51 lines (40 loc) · 1.28 KB
Breadcrumbs
document-api-python
/
test
/
test_workbook.py
Copy path
File metadata and controls
51 lines (40 loc) · 1.28 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import
unittest
import
os
.
path
from
tableaudocumentapi
import
Datasource
,
Workbook
TEST_ASSET_DIR
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'assets'
)
EPHEMERAL_FIELD_FILE
=
os
.
path
.
join
(
TEST_ASSET_DIR
,
'ephemeral_field.twb'
)
SHAPES_FILE
=
os
.
path
.
join
(
TEST_ASSET_DIR
,
'shapes_test.twb'
)
DASHBOARDS_FILE
=
os
.
path
.
join
(
TEST_ASSET_DIR
,
'filtering.twb'
)
class
EphemeralFields
(
unittest
.
TestCase
):
def
test_ephemeral_fields_do_not_cause_errors
(
self
):
wb
=
Workbook
(
EPHEMERAL_FIELD_FILE
)
self
.
assertIsNotNone
(
wb
)
class
Shapes
(
unittest
.
TestCase
):
def
test_shape_exist
(
self
):
wb
=
Workbook
(
SHAPES_FILE
)
self
.
assertEqual
(
wb
.
shapes
, [
'Bug Tracking/bug.png'
,
'Bug Tracking/icon-scheduleitem.png'
,
'Bug Tracking/light.png'
,
'Bug Tracking/mail.png'
,
]
)
def
test_shape_count
(
self
):
wb
=
Workbook
(
SHAPES_FILE
)
self
.
assertEqual
(
len
(
wb
.
shapes
),
4
)
class
Dashboards
(
unittest
.
TestCase
):
def
test_dashboards_setup
(
self
):
wb
=
Workbook
(
DASHBOARDS_FILE
)
self
.
assertIsNotNone
(
wb
)
self
.
assertEqual
(
wb
.
dashboards
, [
'setTest'
])
Back
|
FazBrowse Home
|
New Git URL