Skip to content

Commit 9a5b342

Browse files
committed
test: Ensure back-compat of new _code fields in TOML archives
1 parent 5f22b59 commit 9a5b342

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

tests/openedx_learning/apps/authoring/backup_restore/fixtures/library_backup/entities/subsection1-48afa3.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ version_num = 2
99
[entity.published]
1010
# unpublished: no published_version_num
1111

12+
# Starting with https://github.com/openedx/openedx-core/pull/545,
13+
# containers will derive their identity from `container_code` instead of
14+
# from `key` (although archives without a `container_code` will fall back
15+
# to `key`). We're adding this bit to the test fixture ahead of time to
16+
# ensure that older (Ulmo) code is forward-compatible with archives
17+
# containing `container_code`.
18+
[entity.container]
19+
container_type = "subsection"
20+
container_code = "subsection1-48afa3"
21+
1222
[entity.container.subsection]
1323

1424
# ### Versions

tests/openedx_learning/apps/authoring/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
@@ -9,6 +9,16 @@ version_num = 2
99
[entity.published]
1010
version_num = 2
1111

12+
# Starting with https://github.com/openedx/openedx-core/pull/544,
13+
# components will derive their type and code from these attributes rather
14+
# than by parsing `key` (although archives without an [entity.component] section
15+
# will fall back to parsing `key`). We're adding this bit to the test fixture
16+
# early, ensuring that older (Ulmo) code is forward-compatible with archives
17+
# containing the [entity.component] section.
18+
[entity.component]
19+
component_type = "xblock.v1:html"
20+
component_code = "c22b9f97-f1e9-4e8f-87f0-d5a3c26083e2"
21+
1222
# ### Versions
1323

1424
[[version]]

0 commit comments

Comments
 (0)