Skip to content

Commit 4ba16c8

Browse files
committed
change function names and add comment
1 parent 605594c commit 4ba16c8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/integration/calendar/test_date_picker_persistence.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from dash.dependencies import Input, Output
77

88

9-
def test_rdpr003_persisted_dps(dash_dcc):
9+
def test_rdpr001_persisted_dps(dash_dcc):
1010
app = dash.Dash(__name__)
1111
app.layout = html.Div(
1212
[
@@ -15,6 +15,8 @@ def test_rdpr003_persisted_dps(dash_dcc):
1515
]
1616
)
1717

18+
# changing value of date with each callback to verify
19+
# persistenceTransforms is stripping the time-part from the date-time
1820
@app.callback(Output("container", "children"), [Input("btn", "n_clicks")])
1921
def update_output(value):
2022
return dcc.DatePickerSingle(
@@ -33,13 +35,12 @@ def display_dps(value):
3335
dash_dcc.start_server(app)
3436

3537
dash_dcc.select_date_single("dps", day="2")
36-
3738
dash_dcc.wait_for_text_to_equal("#dps-p", "2020-01-02")
3839
dash_dcc.find_element("#btn").click()
3940
dash_dcc.wait_for_text_to_equal("#dps-p", "2020-01-02")
4041

4142

42-
def test_rdpr004_persisted_dpr(dash_dcc):
43+
def test_rdpr002_persisted_dpr(dash_dcc):
4344
app = dash.Dash(__name__)
4445
app.layout = html.Div(
4546
[
@@ -54,6 +55,8 @@ def test_rdpr004_persisted_dpr(dash_dcc):
5455
]
5556
)
5657

58+
# changing value of start_date and end_date with each callback to verify
59+
# persistenceTransforms is stripping the time-part from the date-time
5760
@app.callback(Output("container", "children"), [Input("btn", "n_clicks")])
5861
def update_output(value):
5962
return dcc.DatePickerRange(
@@ -77,7 +80,6 @@ def display_dpr_end(value):
7780
dash_dcc.start_server(app)
7881

7982
dash_dcc.select_date_range("dpr", (2, 5))
80-
8183
dash_dcc.wait_for_text_to_equal("#dpr-p-start", "2020-01-02")
8284
dash_dcc.wait_for_text_to_equal("#dpr-p-end", "2020-01-05")
8385
dash_dcc.find_element("#btn").click()

0 commit comments

Comments
 (0)