This repository was archived by the owner on Apr 26, 2024. It is now read-only.
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.
Don't set new room alias before potential 403 #10930
Don't set new room alias before potential 403 #10930
Changes from 8 commits
3678173
4387c69
507f6a6
749355e
061c391
7760ccc
5c93b8f
58729e5
903ee78
d971452
837e39a
d450c79
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.
This is going to mutate
self.data
, which might affect tests called afterwards. That means that tests can be sensitive to the order they're ran in, or might not run the same in isolation!For this specific case, I think the other calls to
create_room_as
explicitly setis_public=False
and so each test will behave the same no matter which order they're ran in. But I think we should try to avoid mutatingself.data
anyway, so the reader doesn't have to reason through this.How about:
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'm not sure this is correct: I think there will be a new instance of
TestCreatePublishedRoomACL
for each test.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.
ohhh, but each instance will end up pointing at the same
dict
, I guess, because it's a class-level property rather than an instance-level one. Maybe it'd be better to intialiseself.data
inprepare
?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.
Looks like it! See https://gist.github.com/DMRobertson/40fe186843a327658cbee31bb381e1b2