Skip to content

Commit 00535d1

Browse files
committed
adapt callback integration test for HTTP v1
these didn't run since we updated our HTTP dep back in `v1.2.0`
1 parent 2fa425b commit 00535d1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

test/integration/callbacks/jl_callback_context/jlcbcx001_modified_response.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ callback!(app,
1313
) do value
1414
cookie = HTTP.Cookie("dash_cookie", value * " - cookie")
1515

16-
println(String(cookie, false))
16+
cookie_str = HTTP.Cookies.stringify(cookie)
17+
println(cookie_str)
1718
http_response = callback_context().response
18-
push!(http_response.headers, "Set-Cookie"=>String(cookie, false))
19+
push!(http_response.headers, "Set-Cookie"=>cookie_str)
1920
return value * " - output"
2021
end
2122

22-
run_server(app)
23+
run_server(app)

test/integration/callbacks/test_callback_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_jlcbcx001_modified_response(dashjl):
2020
dashjl.wait_for_text_to_equal("#output", "abcd - output")
2121
cookie = dashjl.driver.get_cookie("dash_cookie")
2222
# cookie gets json encoded
23-
assert cookie["value"] == 'abcd - cookie'
23+
assert cookie["value"] == '"abcd - cookie"'
2424

2525
assert not dashjl.get_logs()
2626

@@ -34,4 +34,4 @@ def test_jlcbcx002_triggered(dashjl):
3434
dashjl.find_element("#" + btn).click()
3535
dashjl.wait_for_text_to_equal(
3636
"#output", "Just clicked {} for the {} time!".format(btn, i)
37-
)
37+
)

0 commit comments

Comments
 (0)