|
1 | 1 | import uuid
|
| 2 | +from copy import deepcopy |
2 | 3 | from datetime import datetime, timedelta
|
3 | 4 |
|
4 | 5 | import pytest
|
@@ -407,15 +408,15 @@ async def test_search_point_does_not_intersect(app_client, ctx):
|
407 | 408 |
|
408 | 409 | @pytest.mark.asyncio
|
409 | 410 | async def test_datetime_response_format(app_client, txn_client, ctx):
|
410 |
| - first_item = ctx.item |
| 411 | + first_item = dict(ctx.item) |
411 | 412 |
|
412 |
| - second_item = dict(first_item) |
| 413 | + second_item = deepcopy(first_item) |
413 | 414 | second_item["id"] = "second-item"
|
414 | 415 | second_item["properties"]["datetime"] = None
|
415 | 416 |
|
416 | 417 | await create_item(txn_client, second_item)
|
417 | 418 |
|
418 |
| - third_item = dict(first_item) |
| 419 | + third_item = deepcopy(first_item) |
419 | 420 | third_item["id"] = "third-item"
|
420 | 421 | del third_item["properties"]["start_datetime"]
|
421 | 422 | del third_item["properties"]["end_datetime"]
|
@@ -444,15 +445,15 @@ async def test_datetime_response_format(app_client, txn_client, ctx):
|
444 | 445 |
|
445 | 446 | @pytest.mark.asyncio
|
446 | 447 | async def test_datetime_non_interval(app_client, txn_client, ctx):
|
447 |
| - first_item = ctx.item |
| 448 | + first_item = dict(ctx.item) |
448 | 449 |
|
449 |
| - second_item = dict(first_item) |
| 450 | + second_item = deepcopy(first_item) |
450 | 451 | second_item["id"] = "second-item"
|
451 | 452 | second_item["properties"]["datetime"] = None
|
452 | 453 |
|
453 | 454 | await create_item(txn_client, second_item)
|
454 | 455 |
|
455 |
| - third_item = dict(first_item) |
| 456 | + third_item = deepcopy(first_item) |
456 | 457 | third_item["id"] = "third-item"
|
457 | 458 | del third_item["properties"]["start_datetime"]
|
458 | 459 | del third_item["properties"]["end_datetime"]
|
@@ -480,15 +481,15 @@ async def test_datetime_non_interval(app_client, txn_client, ctx):
|
480 | 481 |
|
481 | 482 | @pytest.mark.asyncio
|
482 | 483 | async def test_datetime_interval(app_client, txn_client, ctx):
|
483 |
| - first_item = ctx.item |
| 484 | + first_item = dict(ctx.item) |
484 | 485 |
|
485 |
| - second_item = dict(first_item) |
| 486 | + second_item = deepcopy(first_item) |
486 | 487 | second_item["id"] = "second-item"
|
487 | 488 | second_item["properties"]["datetime"] = None
|
488 | 489 |
|
489 | 490 | await create_item(txn_client, second_item)
|
490 | 491 |
|
491 |
| - third_item = dict(first_item) |
| 492 | + third_item = deepcopy(first_item) |
492 | 493 | third_item["id"] = "third-item"
|
493 | 494 | del third_item["properties"]["start_datetime"]
|
494 | 495 | del third_item["properties"]["end_datetime"]
|
@@ -516,15 +517,15 @@ async def test_datetime_interval(app_client, txn_client, ctx):
|
516 | 517 |
|
517 | 518 | @pytest.mark.asyncio
|
518 | 519 | async def test_datetime_bad_non_interval(app_client, txn_client, ctx):
|
519 |
| - first_item = ctx.item |
| 520 | + first_item = dict(ctx.item) |
520 | 521 |
|
521 |
| - second_item = dict(first_item) |
| 522 | + second_item = deepcopy(first_item) |
522 | 523 | second_item["id"] = "second-item"
|
523 | 524 | second_item["properties"]["datetime"] = None
|
524 | 525 |
|
525 | 526 | await create_item(txn_client, second_item)
|
526 | 527 |
|
527 |
| - third_item = dict(first_item) |
| 528 | + third_item = deepcopy(first_item) |
528 | 529 | third_item["id"] = "third-item"
|
529 | 530 | del third_item["properties"]["start_datetime"]
|
530 | 531 | del third_item["properties"]["end_datetime"]
|
@@ -552,15 +553,15 @@ async def test_datetime_bad_non_interval(app_client, txn_client, ctx):
|
552 | 553 |
|
553 | 554 | @pytest.mark.asyncio
|
554 | 555 | async def test_datetime_bad_interval(app_client, txn_client, ctx):
|
555 |
| - first_item = ctx.item |
| 556 | + first_item = dict(ctx.item) |
556 | 557 |
|
557 |
| - second_item = dict(first_item) |
| 558 | + second_item = deepcopy(first_item) |
558 | 559 | second_item["id"] = "second-item"
|
559 | 560 | second_item["properties"]["datetime"] = None
|
560 | 561 |
|
561 | 562 | await create_item(txn_client, second_item)
|
562 | 563 |
|
563 |
| - third_item = dict(first_item) |
| 564 | + third_item = deepcopy(first_item) |
564 | 565 | third_item["id"] = "third-item"
|
565 | 566 | del third_item["properties"]["start_datetime"]
|
566 | 567 | del third_item["properties"]["end_datetime"]
|
|
0 commit comments