Skip to content

Commit 91c06b9

Browse files
committed
test: Ensure back-compat of new _code fields in TOML archives
1 parent 2d5a17b commit 91c06b9

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

tests/openedx_content/applets/backup_restore/fixtures/library_backup/entities/subsection1-48afa3.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,13 @@ version_num = 2
1919

2020
[version.container]
2121
children = ["unit1-b7eafb"]
22+
23+
# Starting with https://github.com/openedx/openedx-core/pull/545,
24+
# containers will derive their identity from `container_code` instead of
25+
# from `key` (although archives without a `container_code` will fall back
26+
# to `key`). We're adding this bit to the test fixture ahead of time to
27+
# ensure that older (Ulmo) code is forward-compatible with archives
28+
# containing `container_code`.
29+
[container]
30+
container_type = "subsection"
31+
container_code = "subsection1-48afa3"

tests/openedx_content/applets/backup_restore/fixtures/library_backup/entities/xblock.v1/html/c22b9f97-f1e9-4e8f-87f0-d5a3c26083e2.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,13 @@ version_num = 2
1414
[[version]]
1515
title = "Text"
1616
version_num = 2
17+
18+
# Starting with https://github.com/openedx/openedx-core/pull/544,
19+
# components will derive their type and code from these attributes rather
20+
# than by parsing `key` (although archives without a [component] section will
21+
# fall back to parsing `key`). We're adding this bit to the test fixture
22+
# early, ensuring that older (Ulmo) code is forward-compatible with archives
23+
# containing the [component] section.
24+
[component]
25+
component_type = "xblock.v1:html"
26+
component_code = "c22b9f97-f1e9-4e8f-87f0-d5a3c26083e2"

0 commit comments

Comments
 (0)