Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support (un)resolving topics #1544
base: main
Are you sure you want to change the base?
Support (un)resolving topics #1544
Changes from 1 commit
6b7eb6b
59b9ab9
16cff3b
7fdf686
1c85d9d
76fafdf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in another comment, if we wish to fully test resolve/unresolve for each of these cases, the resolve/unresolve part could be a nested parametrize, since they are independent.
So you end up with a matrix of parameters from something like the equivalent of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We've been switching towards a double underscore between the function name and the test meaning/motivation - it makes it clearer which part is which. (same elsewhere)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at these cases alone, it's not clear to me what's different in each one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strictly this doesn't cover the ZFL 183+ (Zulip 7) situation, where the first of these parameters was removed?
We could treat the two parameters as a patch to initial data via a dict, but unfortunately that then leaves assumptions as to whether the two values are in
initial_data
, ie. for later versions we strictly want to remove the field.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added cases for ZFL184, where the value of
realm_community_topic_editing_limit_seconds
is None.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point was that some fields are actually missing at some feature levels, not that they are
None
, or I'd at least expect that at early server versions - and if an option is actually removed at a later version?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For comparison with the previous test, we can also assert that the update method is not called, and vice versa in the other test.
I mentioned this point indirectly when the tests were combined - each branch can assert on each element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should report errors, based on how the function currently works - this was the error handling I mentioned was absent, and would be more obvious if restructured to be like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this comment was moved, but it doesn't map to the value being
None
?My related question is whether
edit_time_limit
can end up beingNone
for a well-specified server? It's checked againstNone
below, which might just be related to the.get
calls above, or if the 'seconds' values can actually have a None/null value that has a distinct meaning.