This repository was archived by the owner on Feb 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e03089
commit 679dd02
Showing
5 changed files
with
15 additions
and
21 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,26 @@ | ||
from thoughtspot_tml import Model | ||
from ward import test # type: ignore | ||
from ward import test | ||
|
||
from . import _const | ||
|
||
|
||
for version, file in ("V2", _const.DUMMY_MODEL): | ||
for file in ( _const.DUMMY_MODEL_GA, ): | ||
|
||
@test("Worksheet {version} deep attribute access") | ||
def _(file=file, version=version): | ||
@test("Model deep attribute access") | ||
def _(file=file): | ||
t = Model.load(file) | ||
|
||
assert type(t) is Model | ||
|
||
t.guid | ||
t.model | ||
t.model.formulas | ||
t.model.formulas[0].expr | ||
t.model.columns | ||
t.model.columns[0].properties | ||
t.model.columns[0].properties.column_type | ||
t.model.columns[0].properties.index_type | ||
t.model.properties | ||
t.model.properties.is_bypass_rls | ||
t.model.model_tables | ||
|
||
|
||
if version == "V2": | ||
assert t.is_model is True | ||
t.model.schema | ||
t.model.schema.model_tables | ||
t.model.schema.model_tables[0].name | ||
t.model.schema.model_tables[0].alias |