64c47856dd0de95e2d425012af1542f4d2428824
The error in the test was: ``` AssertionError: The `request` argument must be an instance of `django.http.HttpRequest`, not `rest_framework.request.Request`. ``` The (controversial) incompatible change was in 3.7.4: https://github.com/encode/django-rest-framework/pull/5618 I'll look into whether there's another way to address it. <details> <summary>Full error report</summary> ``` AssertionError: The `request` argument must be an instance of `django.http.HttpRequest`, not `rest_framework.request.Request`. Stacktrace self = <lms.djangoapps.discussion_api.tests.test_views.CommentViewSetListTest testMethod=test_profile_image_request_for_null_endorsed_by> def test_profile_image_request_for_null_endorsed_by(self): """ Tests if 'endorsed' is True but 'endorsed_by' is null, the api does not crash. This is the case for some old/stale data in prod/stage environments. """ self.register_get_user_response(self.user) thread = self.make_minimal_cs_thread({ "thread_type": "question", "endorsed_responses": [make_minimal_cs_comment({ "id": "endorsed_comment", "user_id": self.user.id, "username": self.user.username, "endorsed": True, })], "non_endorsed_resp_total": 0, }) self.register_get_thread_response(thread) self.create_profile_image(self.user, get_profile_image_storage()) response = self.client.get(self.url, { "thread_id": thread["id"], "endorsed": True, > "requested_fields": "profile_image", }) lms/djangoapps/discussion_api/tests/test_views.py:1446: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:291: in get response = super(APIClient, self).get(path, data=data, **extra) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:208: in get return self.generic('GET', path, **r) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:237: in generic method, path, data, content_type, secure, **extra) ../venvs/edxapp/local/lib/python2.7/site-packages/django/test/client.py:416: in generic return self.request(**r) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:288: in request return super(APIClient, self).request(**kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/test.py:240: in request request = super(APIRequestFactory, self).request(**kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/django/test/client.py:501: in request six.reraise(*exc_info) ../venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/exception.py:41: in inner response = get_response(request) ../venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py:249: in _legacy_get_response response = self._get_response(request) ../venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py:187: in _get_response response = self.process_exception_by_middleware(e, request) ../venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py:185: in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py:185: in inner return func(*args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/csrf.py:58: in wrapped_view return view_func(*args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/viewsets.py:95: in view return self.dispatch(request, *args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py:494: in dispatch response = self.handle_exception(exc) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py:491: in dispatch response = handler(request, *args, **kwargs) lms/djangoapps/discussion_api/views.py:505: in list form.cleaned_data["requested_fields"], lms/djangoapps/discussion_api/api.py:659: in get_comment_list results = _serialize_discussion_entities(request, context, responses, requested_fields, DiscussionEntity.comment) lms/djangoapps/discussion_api/api.py:468: in _serialize_discussion_entities request, results, usernames, discussion_entity_type, include_profile_image lms/djangoapps/discussion_api/api.py:413: in _add_additional_response_fields username_profile_dict = _get_user_profile_dict(request, usernames=','.join(usernames)) lms/djangoapps/discussion_api/api.py:350: in _get_user_profile_dict user_profile_details = AccountViewSet.as_view({'get': 'list'})(request).data ../venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/csrf.py:58: in wrapped_view return view_func(*args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/viewsets.py:95: in view return self.dispatch(request, *args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py:477: in dispatch request = self.initialize_request(request, *args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/viewsets.py:118: in initialize_request request = super(ViewSetMixin, self).initialize_request(request, *args, **kwargs) ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/views.py:381: in initialize_request parser_context=parser_context _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <rest_framework.request.Request object at 0x7f597c773890> request = <rest_framework.request.Request object at 0x7f597fa20f90> parsers = [<openedx.core.lib.api.parsers.MergePatchParser object at 0x7f59810c32d0>] authenticators = [<edx_rest_framework_extensions.auth.jwt.authentication.JwtAuthentication object at 0x7f597c713690>, <openedx.core.lib...rest_framework_extensions.auth.session.authentication.SessionAuthenticationAllowInactiveUser object at 0x7f597c773390>] negotiator = <rest_framework.negotiation.DefaultContentNegotiation object at 0x7f597fa20410> parser_context = {'args': (), 'kwargs': {}, 'view': <openedx.core.djangoapps.user_api.accounts.views.AccountViewSet object at 0x7f597c7846d0>} def __init__(self, request, parsers=None, authenticators=None, negotiator=None, parser_context=None): assert isinstance(request, HttpRequest), ( 'The `request` argument must be an instance of ' '`django.http.HttpRequest`, not `{}.{}`.' > .format(request.__class__.__module__, request.__class__.__name__) ) E AssertionError: The `request` argument must be an instance of `django.http.HttpRequest`, not `rest_framework.request.Request`. ../venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/request.py:159: AssertionError ``` </details>
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This is the main edX platform which consists of LMS and Studio. Installation ------------ Please refer to the following wiki pages in our `configuration repo`_ to install edX: - `edX Developer Stack`_: These instructions are for developers who want to contribute or make changes to the edX source code. - `edX Full Stack`_: Using Vagrant/Virtualbox this will setup all edX services on a single server in a production like configuration. - `edX Ubuntu 16.04 64-bit Installation`_: This will install edX on an existing Ubuntu 16.04 server. .. _configuration repo: https://github.com/edx/configuration .. _edX Developer Stack: https://github.com/edx/devstack .. _edX Full Stack: https://openedx.atlassian.net/wiki/display/OpenOPS/Running+Fullstack .. _edX Ubuntu 16.04 64-bit Installation: https://openedx.atlassian.net/wiki/display/OpenOPS/Native+Open+edX+Ubuntu+16.04+64+bit+Installation License ------- The code in this repository is licensed under version 3 of the AGPL unless otherwise noted. Please see the `LICENSE`_ file for details. .. _LICENSE: https://github.com/edx/edx-platform/blob/master/LICENSE More about Open edX ------------------- See the `Open edX site`_ to learn more about Open edX. You can find information about the edX roadmap, as well as about hosting, extending, and contributing to Open edX. In addition, the Open edX Portal provides product announcements, the Open edX blog, and other rich community resources. .. _Open edX site: https://open.edx.org Documentation ------------- Documentation details can be found in the `docs index.rst`_. .. _docs index.rst: docs/index.rst Getting Help ------------ If you’re having trouble, we have several different mailing lists where you can ask for help: - `openedx-ops`_: everything related to *running* Open edX. This includes installation issues, server management, cost analysis, and so on. - `openedx-translation`_: everything related to *translating* Open edX into other languages. This includes volunteer translators, our internationalization infrastructure, issues related to Transifex, and so on. - `openedx-analytics`_: everything related to *analytics* in Open edX. - `edx-code`_: anything else related to Open edX. This includes feature requests, idea proposals, refactorings, and so on. Our real-time conversations are on Slack. You can request a `Slack invitation`_, then join our `community Slack team`_. .. _openedx-ops: https://groups.google.com/forum/#!forum/openedx-ops .. _openedx-translation: https://groups.google.com/forum/#!forum/openedx-translation .. _openedx-analytics: https://groups.google.com/forum/#!forum/openedx-analytics .. _edx-code: https://groups.google.com/forum/#!forum/edx-code .. _Slack invitation: https://openedx-slack-invite.herokuapp.com/ .. _community Slack team: http://openedx.slack.com/ Issue Tracker ------------- `We use JIRA for our issue tracker`_, not GitHub Issues. To file a bug or request a new feature, please make a free account on our JIRA and create a new issue! If you’re filing a bug, we’d appreciate it if you would follow `our guidelines for filing high-quality, actionable bug reports`_. Thanks!! .. _We use JIRA for our issue tracker: https://openedx.atlassian.net/ .. _our guidelines for filing high-quality, actionable bug reports: https://openedx.atlassian.net/wiki/display/SUST/How+to+File+a+Quality+Bug+Report How to Contribute ----------------- Contributions are very welcome, but for legal reasons, you must submit a signed `individual contributor agreement`_ before we can accept your contribution. See our `CONTRIBUTING`_ file for more information – it also contains guidelines for how to maintain high code quality, which will make your contribution more likely to be accepted. Reporting Security Issues ------------------------- Please do not report security issues in public. Please email security@edx.org. .. _individual contributor agreement: https://open.edx.org/wp-content/uploads/2019/01/individual-contributor-agreement.pdf .. _CONTRIBUTING: https://github.com/edx/edx-platform/blob/master/CONTRIBUTING.rst
Languages
Python
73.7%
JavaScript
15.4%
HTML
7.1%
SCSS
3.2%
CSS
0.5%