-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always use lists of dicts for body values
- Loading branch information
Andy Babic
committed
Dec 23, 2024
1 parent
9a13386
commit 3099a0e
Showing
7 changed files
with
53 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,15 @@ | ||
from .utils import convert_simple_streamfield_value_to_dicts | ||
|
||
|
||
SIMPLE_ORIGINAL_BODY_VALUE = [ | ||
("text", "Hello World"), | ||
("integer", "123"), | ||
("date", "2024-12-25"), | ||
TEXT_BLOCK_ID = "813c03ab-e647-4bb0-9c7a-b3c2cb8ea10c" | ||
INTEGER_BLOCK_ID = "e1e72d7d-ce60-45dd-bec7-5a229c2bfb67" | ||
DATE_BLOCK_ID = "550719d5-8fb8-4233-a5ea-51a757708c92" | ||
|
||
ORIGINAL_BODY_VALUE = [ | ||
{"type": "text", "value": "Hello World!", "id": TEXT_BLOCK_ID}, | ||
{"type": "integer", "value": "123", "id": INTEGER_BLOCK_ID}, | ||
{"type": "date", "value": "2024-12-25", "id": DATE_BLOCK_ID}, | ||
] | ||
|
||
COMPLEX_ORIGINAL_BODY_VALUE = convert_simple_streamfield_value_to_dicts( | ||
SIMPLE_ORIGINAL_BODY_VALUE, add_ids=True | ||
) | ||
|
||
|
||
SIMPLE_MODIFIED_BODY_VALUE = [ | ||
("text", "Goodbye Galaxy!"), | ||
("integer", "321"), | ||
("date", "3024-12-25"), | ||
MODIFIED_BODY_VALUE = [ | ||
{"type": "text", "value": "Goodbye Galaxy!", "id": TEXT_BLOCK_ID}, | ||
{"type": "integer", "value": "321", "id": INTEGER_BLOCK_ID}, | ||
{"type": "date", "value": "3024-12-25", "id": DATE_BLOCK_ID}, | ||
] | ||
|
||
COMPLEX_MODIFIED_BODY_VALUE = convert_simple_streamfield_value_to_dicts( | ||
SIMPLE_MODIFIED_BODY_VALUE | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters