Skip to content

Commit

Permalink
fix: resolve inconsistant python dependencies
Browse files Browse the repository at this point in the history
- run `make compile-requirements forum`. Error: It appears that the
Python dependencies in this PR are inconsistent: A re-run of
`make compile-requirements` produced changes.
  • Loading branch information
Muhammad Faraz Maqsood committed Sep 27, 2024
1 parent cb58346 commit 60703b4
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 6 deletions.
1 change: 0 additions & 1 deletion lms/djangoapps/discussion/rest_api/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3831,7 +3831,6 @@ def setUpClass(cls):
super().setUpClass()
cls.course = CourseFactory.create()


@mock.patch.dict("django.conf.settings.FEATURES", {"ENABLE_DISCUSSION_SERVICE": True})
def setUp(self):
super().setUp()
Expand Down
1 change: 1 addition & 0 deletions lms/djangoapps/discussion/rest_api/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ def setUp(self):
patcher = mock.patch('lms.djangoapps.discussion.toggles.ENABLE_FORUM_V2.is_enabled', return_value=False)
patcher.start()
self.addCleanup(patcher.stop)

def test_404(self):
response = self.client.get(
reverse("course_topics", kwargs={"course_id": "non/existent/course"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def retrieve(self, *args, **kwargs):
def _retrieve(self, *args, **kwargs):
response = None
if is_forum_v2_enabled(self.attributes.get("course_id")):
if self.type=="comment":
if self.type == "comment":
response = forum_api.get_parent_comment(self.attributes["id"])
if response is None:
url = self.url(action='get', params=self.attributes)
Expand Down Expand Up @@ -169,7 +169,7 @@ def save(self, params=None):
def delete(self):
response = None
if is_forum_v2_enabled(self.attributes.get("course_id")):
if self.type=="comment":
if self.type == "comment":
response = forum_api.delete_comment(self.attributes["id"])
if response is None:
url = self.url(action='delete', params=self.attributes)
Expand Down
4 changes: 3 additions & 1 deletion requirements/edx/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,9 @@ multidict==6.1.0
# aiohttp
# yarl
mysqlclient==2.2.4
# via -r requirements/edx/kernel.in
# via
# -r requirements/edx/kernel.in
# forum
newrelic==9.13.0
# via
# -r requirements/edx/bundled.in
Expand Down
1 change: 1 addition & 0 deletions requirements/edx/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,7 @@ mysqlclient==2.2.4
# via
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# forum
newrelic==9.13.0
# via
# -r requirements/edx/doc.txt
Expand Down
4 changes: 3 additions & 1 deletion requirements/edx/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,9 @@ multidict==6.1.0
# aiohttp
# yarl
mysqlclient==2.2.4
# via -r requirements/edx/base.txt
# via
# -r requirements/edx/base.txt
# forum
newrelic==9.13.0
# via
# -r requirements/edx/base.txt
Expand Down
4 changes: 3 additions & 1 deletion requirements/edx/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,9 @@ multidict==6.1.0
# aiohttp
# yarl
mysqlclient==2.2.4
# via -r requirements/edx/base.txt
# via
# -r requirements/edx/base.txt
# forum
newrelic==9.13.0
# via
# -r requirements/edx/base.txt
Expand Down

0 comments on commit 60703b4

Please sign in to comment.