Skip to content

Commit 5caf72c

Browse files
committed
refactor: update for rebase-introduced migration and API change
1 parent ed987b3 commit 5caf72c

4 files changed

Lines changed: 15 additions & 171 deletions

File tree

openedx_learning/apps/authoring/publishing/migrations/0005_draftchangelog.py

Lines changed: 0 additions & 68 deletions
This file was deleted.

openedx_learning/apps/authoring/publishing/migrations/0006_bootstrap_draftchangelog.py

Lines changed: 0 additions & 94 deletions
This file was deleted.

tests/openedx_learning/apps/authoring/publishing/test_api.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -886,8 +886,10 @@ def test_parent_child_side_effects(self) -> None:
886886
container.pk,
887887
1,
888888
title="My Container",
889-
publishable_entities_pks=[child_1.id, child_2.id],
890-
entity_version_pks=None,
889+
entity_rows=[
890+
publishing_api.ContainerEntityRow(entity_pk=child_1.pk),
891+
publishing_api.ContainerEntityRow(entity_pk=child_2.pk),
892+
],
891893
created=self.now,
892894
created_by=None,
893895
)
@@ -965,8 +967,10 @@ def test_bulk_parent_child_side_effects(self) -> None:
965967
container.pk,
966968
1,
967969
title="My Container",
968-
publishable_entities_pks=[child_1.id, child_2.id],
969-
entity_version_pks=None,
970+
entity_rows=[
971+
publishing_api.ContainerEntityRow(entity_pk=child_1.pk),
972+
publishing_api.ContainerEntityRow(entity_pk=child_2.pk),
973+
],
970974
created=self.now,
971975
created_by=None,
972976
)
@@ -1032,8 +1036,9 @@ def test_multiple_layers_of_containers(self):
10321036
unit.pk,
10331037
1,
10341038
title="My Unit",
1035-
publishable_entities_pks=[component.pk],
1036-
entity_version_pks=None,
1039+
entity_rows=[
1040+
publishing_api.ContainerEntityRow(entity_pk=component.pk),
1041+
],
10371042
created=self.now,
10381043
created_by=None,
10391044
)
@@ -1044,8 +1049,9 @@ def test_multiple_layers_of_containers(self):
10441049
subsection.pk,
10451050
1,
10461051
title="My Subsection",
1047-
publishable_entities_pks=[unit.pk],
1048-
entity_version_pks=None,
1052+
entity_rows=[
1053+
publishing_api.ContainerEntityRow(entity_pk=unit.pk),
1054+
],
10491055
created=self.now,
10501056
created_by=None,
10511057
)

tests/openedx_learning/apps/authoring/units/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def test_create_unit_queries(self):
173173
# The exact numbers here aren't too important - this is just to alert us if anything significant changes.
174174
with self.assertNumQueries(25):
175175
_empty_unit = self.create_unit_with_components([])
176-
with self.assertNumQueries(28):
176+
with self.assertNumQueries(29):
177177
# And try with a non-empty unit:
178178
self.create_unit_with_components([self.component_1, self.component_2_v1], key="u2")
179179

0 commit comments

Comments
 (0)