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

Fix these tests, which fail in both Tutor and Devstack #32353

Closed
12 tasks done
Tracked by #152 ...
kdmccormick opened this issue Jan 9, 2023 · 2 comments
Closed
12 tasks done
Tracked by #152 ...

Fix these tests, which fail in both Tutor and Devstack #32353

kdmccormick opened this issue Jan 9, 2023 · 2 comments
Labels
enhancement Relates to new features or improvements to existing features help wanted Ready to be picked up by anyone in the community

Comments

@kdmccormick
Copy link
Member

kdmccormick commented Jan 9, 2023

Background

From the result of openedx-unsupported/wg-developer-experience#36, 12 tests fail in both Devstack and Tutor. The tests are listed below, and the full requests are in this spreadsheet.

Let's get those tests passing in Tutor.

Tasks

Fix the following tests so that they pass in Tutor when run using Tutor's test-running instructions:

  • lms/djangoapps/discussion/rest_api/tests/test_api.py::CourseTopicsV2Test::test_default_response
  • lms/djangoapps/discussion/rest_api/tests/test_api.py::CourseTopicsV2Test::test_filtering
  • lms/djangoapps/discussion/rest_api/tests/test_api.py::CourseTopicsV2Test::test_other_providers_ordering_error
  • lms/djangoapps/discussion/rest_api/tests/test_api.py::CourseTopicsV2Test::test_sort_by_activity
  • lms/djangoapps/discussion/rest_api/tests/test_api.py::CourseTopicsV2Test::test_sort_by_name
  • lms/djangoapps/discussion/rest_api/tests/test_api.py::CourseTopicsV2Test::test_sort_by_structure
  • lms/djangoapps/discussion/rest_api/tests/test_views.py::CourseTopicsViewTest::test_new_course_structure_response
  • lms/djangoapps/discussion/rest_api/tests/test_views.py::CourseTopicsViewV3Test::test_basic
  • lms/djangoapps/discussion/rest_api/tests/test_views.py::CourseTopicsViewV3Test::test_inactive
  • lms/djangoapps/discussion/rest_api/tests/test_views.py::CourseTopicsViewV3Test::test_not_authenticated
  • openedx/core/djangoapps/content_libraries/tests/test_runtime.py::ContentLibraryXBlockUserStateTest::test_i18n
  • openedx/core/djangoapps/content_libraries/tests/test_runtime.py::ContentLibraryXBlockUserStateTest::test_state_for_anonymous_users

Notes

n/a

@kdmccormick kdmccormick self-assigned this Jan 9, 2023
@kdmccormick kdmccormick changed the title Make ALL edx-platform tests fail or be skipped in Tutor Make ALL edx-platform tests pass or be skipped in Tutor Jan 9, 2023
@kdmccormick kdmccormick changed the title Make ALL edx-platform tests pass or be skipped in Tutor Ensure edx-platform test suite passes in Tutor without any failures Jan 11, 2023
@kdmccormick kdmccormick removed their assignment Jan 11, 2023
@kdmccormick kdmccormick added the enhancement Relates to new features or improvements to existing features label Jun 2, 2023
@kdmccormick kdmccormick changed the title Ensure edx-platform test suite passes in Tutor without any failures Fix these tests, which fail in both Tutor and Devstack Jun 2, 2023
@kdmccormick kdmccormick transferred this issue from openedx-unsupported/wg-developer-experience Jun 2, 2023
@kdmccormick kdmccormick added the help wanted Ready to be picked up by anyone in the community label Jun 17, 2024
@devkhan
Copy link

devkhan commented Jun 28, 2024

The tests seem to be passing now. Here are the logs when running these specific tests:

export EDXAPP_TEST_MONGO_HOST=mongodb
pytest --ds=lms.envs.test \
lms/djangoapps/discussion/rest_api/tests/test_api.py::CourseTopicsV2Test::test_default_response lms/djangoapps/discussion/rest_api/tests/test_api.py::CourseTopicsV2Test::test_filtering lms/djangoapps/discussion/rest_api/tests/test_api.py::CourseTopicsV2Test::test_other_providers_ordering_error lms/djangoapps/discussion/rest_api/tests/test_api.py::CourseTopicsV2Test::test_sort_by_activity lms/djangoapps/discussion/rest_api/tests/test_api.py::CourseTopicsV2Test::test_sort_by_name lms/djangoapps/discussion/rest_api/tests/test_api.py::CourseTopicsV2Test::test_sort_by_structure lms/djangoapps/discussion/rest_api/tests/test_views.py::CourseTopicsViewTest::test_new_course_structure_response lms/djangoapps/discussion/rest_api/tests/test_views.py::CourseTopicsViewV3Test::test_basic lms/djangoapps/discussion/rest_api/tests/test_views.py::CourseTopicsViewV3Test::test_inactive lms/djangoapps/discussion/rest_api/tests/test_views.py::CourseTopicsViewV3Test::test_not_authenticated openedx/core/djangoapps/content_libraries/tests/test_runtime.py::ContentLibraryXBlockUserStateTest::test_i18n openedx/core/djangoapps/content_libraries/tests/test_runtime.py::ContentLibraryXBlockUserStateTest::test_state_for_anonymous_users



============================================================================= test session starts ==============================================================================
platform linux -- Python 3.11.8, pytest-8.2.0, pluggy-1.5.0
Using --randomly-seed=2537639032
django: version: 4.2.13, settings: lms.envs.test (from option)
rootdir: /openedx/edx-platform
configfile: setup.cfg
plugins: Faker-25.0.1, json-report-1.5.0, randomly-3.15.0, xdist-3.6.1, anyio-4.3.0, django-4.8.0, metadata-1.8.0, cov-5.0.0, attrib-0.1.3
collected 10 items

=============================================================================== warnings summary ===============================================================================
../venv/lib/python3.11/site-packages/webob/compat.py:5
  /openedx/venv/lib/python3.11/site-packages/webob/compat.py:5: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
    from cgi import parse_header

../venv/lib/python3.11/site-packages/django/conf/__init__.py:267
  /openedx/venv/lib/python3.11/site-packages/django/conf/__init__.py:267: RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with Django 5.0, localized formatting of data will always be enabled. For example Django will display numbers and dates using the format of the current locale.
    warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning)

../venv/lib/python3.11/site-packages/django/conf/__init__.py:278
  /openedx/venv/lib/python3.11/site-packages/django/conf/__init__.py:278: RemovedInDjango51Warning: The DEFAULT_FILE_STORAGE setting is deprecated. Use STORAGES instead.
    warnings.warn(DEFAULT_FILE_STORAGE_DEPRECATED_MSG, RemovedInDjango51Warning)

../venv/lib/python3.11/site-packages/django/conf/__init__.py:289
  /openedx/venv/lib/python3.11/site-packages/django/conf/__init__.py:289: RemovedInDjango51Warning: The STATICFILES_STORAGE setting is deprecated. Use STORAGES instead.
    warnings.warn(STATICFILES_STORAGE_DEPRECATED_MSG, RemovedInDjango51Warning)

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'djpyfs.FSExpirations' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'coursewarehistoryextended.StudentModuleHistoryExtended' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'completion.BlockCompletion' instead.
    warnings.warn(

openedx/core/storage.py:114
  /openedx/edx-platform/openedx/core/storage.py:114: RemovedInDjango51Warning: django.core.files.storage.get_storage_class is deprecated in favor of using django.core.files.storage.storages.
    return get_storage_class(storage_class)(**kwargs)

../venv/lib/python3.11/site-packages/pgpy/constants.py:5
  /openedx/venv/lib/python3.11/site-packages/pgpy/constants.py:5: DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13
    import imghdr

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'celery_utils.FailedTask' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'grades.PersistentSubsectionGrade' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'grades.PersistentCourseGrade' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/user_tasks/conf.py:40
  /openedx/venv/lib/python3.11/site-packages/user_tasks/conf.py:40: RemovedInDjango51Warning: django.core.files.storage.get_storage_class is deprecated in favor of using django.core.files.storage.storages.
    return get_storage_class(import_path)()

../venv/lib/python3.11/site-packages/blockstore/apps/bundles/storage.py:146
  /openedx/venv/lib/python3.11/site-packages/blockstore/apps/bundles/storage.py:146: RemovedInDjango51Warning: django.core.files.storage.get_storage_class is deprecated in favor of using django.core.files.storage.storages.
    self.asset_backend = get_storage_class(storage_class)(**storage_kwargs)

../venv/lib/python3.11/site-packages/blockstore/apps/bundles/storage.py:87
  /openedx/venv/lib/python3.11/site-packages/blockstore/apps/bundles/storage.py:87: RemovedInDjango51Warning: django.core.files.storage.get_storage_class is deprecated in favor of using django.core.files.storage.storages.
    S3Boto3Storage = get_storage_class("storages.backends.s3boto3.S3Boto3Storage")

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'experiments.ExperimentData' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/edxval/utils.py:158
  /openedx/venv/lib/python3.11/site-packages/edxval/utils.py:158: RemovedInDjango51Warning: django.core.files.storage.get_storage_class is deprecated in favor of using django.core.files.storage.storages.
    return get_storage_class(

../venv/lib/python3.11/site-packages/edxval/utils.py:183
  /openedx/venv/lib/python3.11/site-packages/edxval/utils.py:183: RemovedInDjango51Warning: django.core.files.storage.get_storage_class is deprecated in favor of using django.core.files.storage.storages.
    return get_storage_class(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'learning_sequences.CourseSection' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/integrated_channels/utils.py:28
  /openedx/venv/lib/python3.11/site-packages/integrated_channels/utils.py:28: RemovedInDjango50Warning: The django.utils.timezone.utc alias is deprecated. Please update your code to use datetime.timezone.utc instead.
    UNIX_EPOCH = datetime(1970, 1, 1, tzinfo=timezone.utc)

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'integrated_channel.ContentMetadataItemTransmission' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'integrated_channel.OrphanedContentTransmissions' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'degreed.DegreedLearnerDataTransmissionAudit' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'degreed2.Degreed2LearnerDataTransmissionAudit' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'sap_success_factors.SapSuccessFactorsLearnerDataTransmissionAudit' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'cornerstone.CornerstoneLearnerDataTransmissionAudit' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'xapi.XAPILearnerDataTransmissionAudit' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'blackboard.BlackboardLearnerDataTransmissionAudit' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'canvas.CanvasLearnerDataTransmissionAudit' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/django/db/models/options.py:210
  /openedx/venv/lib/python3.11/site-packages/django/db/models/options.py:210: RemovedInDjango51Warning: 'index_together' is deprecated. Use 'Meta.indexes' in 'moodle.MoodleLearnerDataTransmissionAudit' instead.
    warnings.warn(

../venv/lib/python3.11/site-packages/httpretty/core.py:176
  /openedx/venv/lib/python3.11/site-packages/httpretty/core.py:176: DeprecationWarning: 'urllib3.contrib.pyopenssl' module is deprecated and will be removed in a future release of urllib3 2.x. Read more in this issue: https://github.com/urllib3/urllib3/issues/2680
    from requests.packages.urllib3.contrib.pyopenssl import inject_into_urllib3, extract_from_urllib3

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================= 31 warnings in 3.88s =============================================================================

@devkhan
Copy link

devkhan commented Jun 28, 2024

Can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Relates to new features or improvements to existing features help wanted Ready to be picked up by anyone in the community
Projects
No open projects
Status: Refined
Development

No branches or pull requests

2 participants