Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix autofield error on restricted runs tests #972

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions enterprise_catalog/apps/catalog/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,14 +808,14 @@ def _create_objects_and_relationships(
},
},
'create_restricted_courses': {
0: {
1: {
'content_key': 'edX+course',
'catalog_query': '22222222-2222-2222-2222-222222222222',
'json_metadata': {'foobar': 'override metadata'},
},
},
'create_restricted_run_allowed_for_restricted_course': [
{'course': 0, 'run': 'course-v1:edX+course+run2'},
{'course': 1, 'run': 'course-v1:edX+course+run2'},
],
'expected_json_metadata': [
{'foobar': 'base metadata'},
Expand Down Expand Up @@ -849,14 +849,14 @@ def _create_objects_and_relationships(
},
},
'create_restricted_courses': {
0: {
1: {
'content_key': 'edX+course',
'catalog_query': '11111111-1111-1111-1111-111111111111',
'json_metadata': {'foobar': 'override metadata'},
},
},
'create_restricted_run_allowed_for_restricted_course': [
{'course': 0, 'run': 'course-v1:edX+course+run2'},
{'course': 1, 'run': 'course-v1:edX+course+run2'},
],
'expected_json_metadata': [
{'foobar': 'base metadata'},
Expand Down Expand Up @@ -888,14 +888,14 @@ def _create_objects_and_relationships(
},
},
'create_restricted_courses': {
0: {
1: {
'content_key': 'edX+course',
'catalog_query': '11111111-1111-1111-1111-111111111111',
'json_metadata': {'foobar': 'override metadata'},
},
},
'create_restricted_run_allowed_for_restricted_course': [
{'course': 0, 'run': 'course-v1:edX+course+run1'},
{'course': 1, 'run': 'course-v1:edX+course+run1'},
],
'expected_json_metadata': [
{'foobar': 'base metadata'},
Expand Down Expand Up @@ -1022,15 +1022,15 @@ def test_catalog_content_metadata_with_restricted_runs(
},
},
'create_restricted_courses': {
0: {
1: {
'content_key': 'edX+course',
# Not the caller's catalog!
'catalog_query': '22222222-2222-2222-2222-222222222222',
'json_metadata': {'foobar': 'override metadata'},
},
},
'create_restricted_run_allowed_for_restricted_course': [
{'course': 0, 'run': 'course-v1:edX+course+run2'},
{'course': 1, 'run': 'course-v1:edX+course+run2'},
],
'requested_content_keys': ['course-v1:edX+course+run2'],
'expected_json_metadata': [
Expand Down Expand Up @@ -1066,14 +1066,14 @@ def test_catalog_content_metadata_with_restricted_runs(
},
},
'create_restricted_courses': {
0: {
1: {
'content_key': 'edX+course',
'catalog_query': '11111111-1111-1111-1111-111111111111',
'json_metadata': {'foobar': 'override metadata'},
},
},
'create_restricted_run_allowed_for_restricted_course': [
{'course': 0, 'run': 'course-v1:edX+course+run2'},
{'course': 1, 'run': 'course-v1:edX+course+run2'},
],
'requested_content_keys': ['course-v1:edX+course+run1'],
'expected_json_metadata': [
Expand Down Expand Up @@ -1110,14 +1110,14 @@ def test_catalog_content_metadata_with_restricted_runs(
},
},
'create_restricted_courses': {
0: {
1: {
'content_key': 'edX+course',
'catalog_query': '11111111-1111-1111-1111-111111111111',
'json_metadata': {'foobar': 'override metadata'},
},
},
'create_restricted_run_allowed_for_restricted_course': [
{'course': 0, 'run': 'course-v1:edX+course+run1'},
{'course': 1, 'run': 'course-v1:edX+course+run1'},
],
'requested_content_keys': ['course-v1:edX+course+run1'],
'expected_json_metadata': [
Expand Down
Loading