Skip to content

Commit

Permalink
Fix tests args
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajkoti committed Jan 24, 2025
1 parent 92314e8 commit 859f3ad
Showing 1 changed file with 51 additions and 9 deletions.
60 changes: 51 additions & 9 deletions tests/operators/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,47 +776,89 @@ def test_store_compiled_sql() -> None:
(
DbtSeedLocalOperator,
{"full_refresh": True},
{"context": {}, "env": {}, "cmd_flags": ["seed", "--full-refresh"]},
{
"context": {},
"env": {},
"cmd_flags": ["seed", "--full-refresh"],
"run_as_async": False,
"async_context": None,
},
),
(
DbtBuildLocalOperator,
{"full_refresh": True},
{"context": {}, "env": {}, "cmd_flags": ["build", "--full-refresh"]},
{
"context": {},
"env": {},
"cmd_flags": ["build", "--full-refresh"],
"run_as_async": False,
"async_context": None,
},
),
(
DbtRunLocalOperator,
{"full_refresh": True},
{"context": {}, "env": {}, "cmd_flags": ["run", "--full-refresh"]},
{
"context": {},
"env": {},
"cmd_flags": ["run", "--full-refresh"],
"run_as_async": False,
"async_context": None,
},
),
(
DbtCloneLocalOperator,
{"full_refresh": True},
{"context": {}, "env": {}, "cmd_flags": ["clone", "--full-refresh"]},
{
"context": {},
"env": {},
"cmd_flags": ["clone", "--full-refresh"],
"run_as_async": False,
"async_context": None,
},
),
(
DbtTestLocalOperator,
{},
{"context": {}, "env": {}, "cmd_flags": ["test"]},
{"context": {}, "env": {}, "cmd_flags": ["test"], "run_as_async": False, "async_context": None},
),
(
DbtTestLocalOperator,
{"select": []},
{"context": {}, "env": {}, "cmd_flags": ["test"]},
{"context": {}, "env": {}, "cmd_flags": ["test"], "run_as_async": False, "async_context": None},
),
(
DbtTestLocalOperator,
{"full_refresh": True, "select": ["tag:daily"], "exclude": ["tag:disabled"]},
{"context": {}, "env": {}, "cmd_flags": ["test", "--select", "tag:daily", "--exclude", "tag:disabled"]},
{
"context": {},
"env": {},
"cmd_flags": ["test", "--select", "tag:daily", "--exclude", "tag:disabled"],
"run_as_async": False,
"async_context": None,
},
),
(
DbtTestLocalOperator,
{"full_refresh": True, "selector": "nightly_snowplow"},
{"context": {}, "env": {}, "cmd_flags": ["test", "--selector", "nightly_snowplow"]},
{
"context": {},
"env": {},
"cmd_flags": ["test", "--selector", "nightly_snowplow"],
"run_as_async": False,
"async_context": None,
},
),
(
DbtRunOperationLocalOperator,
{"args": {"days": 7, "dry_run": True}, "macro_name": "bla"},
{"context": {}, "env": {}, "cmd_flags": ["run-operation", "bla", "--args", "days: 7\ndry_run: true\n"]},
{
"context": {},
"env": {},
"cmd_flags": ["run-operation", "bla", "--args", "days: 7\ndry_run: true\n"],
"run_as_async": False,
"async_context": None,
},
),
],
)
Expand Down

0 comments on commit 859f3ad

Please sign in to comment.