Merge pull request #3669 from cpennington/opaque-keys-fix-discussion-tests
Fix discussions by correctly serializing outgoing course_ids
This commit is contained in:
@@ -285,7 +285,7 @@ class UserProfileTestCase(ModuleStoreTestCase):
|
||||
StringEndsWithMatcher('/users/{}/active_threads'.format(self.profiled_user.id)),
|
||||
data=None,
|
||||
params=PartialDictMatcher({
|
||||
"course_id": self.course.id,
|
||||
"course_id": self.course.id.to_deprecated_string(),
|
||||
"page": params.get("page", 1),
|
||||
"per_page": views.THREADS_PER_PAGE
|
||||
}),
|
||||
|
||||
@@ -87,7 +87,7 @@ class User(models.Model):
|
||||
if not self.course_id:
|
||||
raise CommentClientRequestError("Must provide course_id when retrieving active threads for the user")
|
||||
url = _url_for_user_active_threads(self.id)
|
||||
params = {'course_id': self.course_id}
|
||||
params = {'course_id': self.course_id.to_deprecated_string()}
|
||||
params = merge_dict(params, query_params)
|
||||
response = perform_request(
|
||||
'get',
|
||||
@@ -103,7 +103,7 @@ class User(models.Model):
|
||||
if not self.course_id:
|
||||
raise CommentClientRequestError("Must provide course_id when retrieving subscribed threads for the user")
|
||||
url = _url_for_user_subscribed_threads(self.id)
|
||||
params = {'course_id': self.course_id}
|
||||
params = {'course_id': self.course_id.to_deprecated_string()}
|
||||
params = merge_dict(params, query_params)
|
||||
response = perform_request(
|
||||
'get',
|
||||
@@ -119,7 +119,7 @@ class User(models.Model):
|
||||
url = self.url(action='get', params=self.attributes)
|
||||
retrieve_params = self.default_retrieve_params
|
||||
if self.attributes.get('course_id'):
|
||||
retrieve_params['course_id'] = self.course_id
|
||||
retrieve_params['course_id'] = self.course_id.to_deprecated_string()
|
||||
try:
|
||||
response = perform_request(
|
||||
'get',
|
||||
|
||||
Reference in New Issue
Block a user