Closed LanghaniKuldeep closed 6 years ago
@pomegranited would you like to review or assign someone else from your team? I'm not sure who to assign that.
FYI @xitij2000 -- is this task on your radar?
@pomegranited Nope will make a ticket for it now.
@naeem91 You can ping me in such cases and I will take care of it.
sure @xitij2000 Thanks!
@ahmedaljazzar Please have a look. I have made the requested changes.
@LanghaniKuldeep, I left you a comment on the change. Please make sure to add some tests for the new functionality you're introducing..
@ahmedaljazzar As in this I have created a private method and that is using another private method '_replace_static_from_url' and that is importing 'from static_replace import replace_static_urls' from edx-platform. Therefore I might not be able to write test this for description and hotspot.
@ahmedaljazzar I guess not. That file is required from the platform or we have to setup mock and that would be a bit overkill for this scope.
@LanghaniKuldeep We are trying to improve test coverage of this XBlock by requiring all code changes to include tests for relevant parts of the code before approving he PR.
For this change I think it would be sufficient to add a test to existing unit test file, which verifies that all URLs included in the student_view_data
response have been processed by the _replace_static_from_url
function.
@ahmedaljazzar this is ready for another pass. Added some unit tests
Thanks, @naeem91. Will start the review soon.
@ahmedaljazzar /@xitij2000 gentle review reminder!!
This LGTM 👍
CC: @xitij2000, @mtyaka
@naeem91 Could you please squash this? You can ping me and I can merge it once it's squashed.
@xitij2000 Commits squashed, good to merge now. Thanks!
Replacing static URLs with absolute URLs for student_view_data in description and hotspots.