models: Use parent model to get comment's 'list_archive_url'
We were attempting to retrieve the 'list_archive_url' attribute from the
'PatchComment' or 'CoverComment' instances, rather than the parent
'Patch' and 'Cover' object, respectively. Correct this and add plenty of
tests to prevent this regressing.
Conflicts:
patchwork/models.py
Changes:
patchwork/tests/api/test_comment.py
NOTE(stephenfin): Conflicts and changes are necessary to deal with the
fact we have a single comment model instead of two comment models as in
stable/3.0.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: 02ffb1315 ("models: Add list archive lookup")
Closes: #391
(cherry picked from commit
93ff4db29262c0560122f61eadf78d9626def238)
(cherry picked from commit
6c73a55c52ecd6d756901c9e9647fae57aceda01)