Merge pull request #12568 from edx/jia/MA-2419
MA-2419: make thread 'read' mutual exlusive to update fields
This commit is contained in:
@@ -269,6 +269,18 @@ class CommentsServiceMockMixin(object):
|
||||
status=200
|
||||
)
|
||||
|
||||
def register_read_response(self, user, content_type, content_id):
|
||||
"""
|
||||
Register a mock response for POST on the CS 'read' endpoint
|
||||
"""
|
||||
httpretty.register_uri(
|
||||
httpretty.POST,
|
||||
"http://localhost:4567/api/v1/users/{id}/read".format(id=user.id),
|
||||
params={'source_type': content_type, 'source_id': content_id},
|
||||
body=json.dumps({}), # body is unused
|
||||
status=200
|
||||
)
|
||||
|
||||
def register_thread_flag_response(self, thread_id):
|
||||
"""Register a mock response for PUT on the CS thread flag endpoints"""
|
||||
self.register_flag_response("thread", thread_id)
|
||||
|
||||
Reference in New Issue
Block a user