Skip to content

Commit 51bab39

Browse files
committed
test: fix deprecated datetime serialisation (follow-up to #2314)
1 parent bdd9c5d commit 51bab39

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/async/test_assertions.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# limitations under the License.
1414

1515
import asyncio
16+
import datetime
1617
import re
17-
from datetime import datetime
1818

1919
import pytest
2020

@@ -183,7 +183,11 @@ async def test_assertions_locator_to_have_js_property(
183183
)
184184
await expect(page.locator("div")).to_have_js_property(
185185
"foo",
186-
{"a": 1, "b": "string", "c": datetime.utcfromtimestamp(1627503992000 / 1000)},
186+
{
187+
"a": 1,
188+
"b": "string",
189+
"c": datetime.datetime.fromtimestamp(1627503992000 / 1000),
190+
},
187191
)
188192

189193

0 commit comments

Comments
 (0)