Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Data Logistics Service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eFlows4HPC WP2
Data Logistics Service
Commits
d3684dc6
Commit
d3684dc6
authored
3 years ago
by
Jedrzej Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
one more to fix
parent
70dbc09a
No related branches found
No related tags found
No related merge requests found
Pipeline
#77457
failed
3 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_b2shareoperator.py
+3
-2
3 additions, 2 deletions
tests/test_b2shareoperator.py
with
3 additions
and
2 deletions
tests/test_b2shareoperator.py
+
3
−
2
View file @
d3684dc6
import
unittest
from
airflow.utils.state
import
State
from
airflow.utils.dates
import
days_ago
from
dags.b2shareoperator
import
B2ShareOperator
from
airflow
import
DAG
from
airflow.models.taskinstance
import
TaskInstance
...
...
@@ -9,13 +10,13 @@ TEST_DAG_ID = 'test_my_custom_operator'
class
B2ShareOperatorTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
dag
=
DAG
(
TEST_DAG_ID
,
schedule_interval
=
'
@daily
'
,
default_args
=
{
'
start_date
'
:
DEFAULT_DATE
})
self
.
dag
=
DAG
(
TEST_DAG_ID
,
schedule_interval
=
'
@daily
'
,
default_args
=
{
'
start_date
'
:
days_ago
(
2
)
})
self
.
op
=
B2ShareOperator
(
dag
=
self
.
dag
,
task_id
=
'
test
'
,
name
=
'
test_name
'
)
self
.
ti
=
TaskInstance
(
task
=
self
.
op
,
execution_date
=
DEFAULT_DATE
)
self
.
ti
=
TaskInstance
(
task
=
self
.
op
,
execution_date
=
days_ago
(
1
)
)
def
test_execute_no_trigger
(
self
):
self
.
ti
.
run
(
ignore_ti_state
=
True
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment