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

Bszabo/course optimizer tests #36175

Open
wants to merge 2 commits into
base: 2u/course-optimizer
Choose a base branch
from

Conversation

bszabo
Copy link
Contributor

@bszabo bszabo commented Jan 27, 2025

Added unit tests, plus one integration test, to the Course Optimizer test suite.

Note that the test development task is incomplete. Some tests remain in "skip" state, and there are TODO statements in the test file.

@bszabo bszabo changed the base branch from master to 2u/course-optimizer January 27, 2025 14:07
LOGGER.debug(f'[Link Check] request batch {i // batch_size + 1} of {url_count // batch_size + 1}')
batch_results = await _validate_batch(batch, course_key)
responses.extend(batch_results)
LOGGER.debug(f'[Link Check] request batch {i // batch_size + 1} of {url_count // batch_size + 1}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we leave this logging statement here?
Or should we update this logging statement to be recorded on datadog in stage and prod?

Copy link
Contributor Author

@bszabo bszabo Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schenedx What's involved in having it be recorded on Datadog?

Copy link
Contributor

@schenedx schenedx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my inline comments

cms/djangoapps/contentstore/tasks.py Show resolved Hide resolved
cms/djangoapps/contentstore/tests/test_tasks.py Outdated Show resolved Hide resolved
cms/djangoapps/contentstore/tests/test_tasks.py Outdated Show resolved Hide resolved
cms/djangoapps/contentstore/tests/test_tasks.py Outdated Show resolved Hide resolved
cms/djangoapps/contentstore/tests/test_tasks.py Outdated Show resolved Hide resolved
def test_http_and_https_recognized_as_studio_url_schemes(self):
assert True

@pytest.mark.skip(reason="This test is not yet implemented")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of skipping, could you just remove the test case? I think we got enough tests for now.


def test_url_subsitution_on_containers(self):
raise NotImplementedError
# TODO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove the todo? If in the future, we found this test is valuable, we can add it.

cms/djangoapps/contentstore/tests/test_tasks.py Outdated Show resolved Hide resolved
@bszabo
Copy link
Contributor Author

bszabo commented Jan 28, 2025

I've removed all skipped tests and marked comments requesting their removal as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants