Allow timestamp to be set for comment models in test cases
Review Request #12394 — Created June 21, 2022 and submitted
The create methods for comments in
properly set the timestamp when a
timestampargument is passed. This is
because the timestamp is being overriden when when the comment object is saved.
This change allows
reviewboard.testing.TestCaseto properly set the timestamp
timestampargument is passed.
Ran all unit tests in
reviewboard.webapi.tests, which make use of the create
Can you add a
I know technically this was available to be passed in
**kwargs, but clearly that didn't work.
Our chaining-based formatting doesn't work super well for things like updates.
For things like this, I generally recommend:
queryset = FileAttachmentComment.objects.filter(...) queryset.update(...)
Helps distinguish the query from the operation, when it has to span lines. Of course, the query can be chained as needed.