forked from zulip/zulip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
requirements: Update sqlalchemy to 1.2.4.
This requires updating one of the tests for the group_pm_with feature in test_narrow to use the new style of tautology generated by SQLAlchemy. Thanks to Sinwar for investigating this. Fixes zulip#8381.
- Loading branch information
Showing
4 changed files
with
5 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -221,11 +221,7 @@ def test_add_term_using_id_operator_and_negated(self) -> None: # NEGATED | |
def test_add_term_using_group_pm_operator_and_not_the_same_user_as_operand(self) -> None: | ||
# Test wtihout any such group PM threads existing | ||
term = dict(operator='group-pm-with', operand=self.example_email("othello")) | ||
with mock.patch("sqlalchemy.util.warn") as mock_warn: | ||
self._do_add_term_test(term, 'WHERE recipient_id != recipient_id') | ||
|
||
# SQLalchemy warns because this query is a tautology. | ||
mock_warn.assert_called_once() | ||
self._do_add_term_test(term, 'WHERE 1 != 1') | ||
|
||
# Test with at least one such group PM thread existing | ||
self.send_huddle_message(self.user_profile.email, [self.example_email("othello"), | ||
|
@@ -237,7 +233,7 @@ def test_add_term_using_group_pm_operator_and_not_the_same_user_as_operand(self) | |
def test_add_term_using_group_pm_operator_not_the_same_user_as_operand_and_negated( | ||
self) -> None: # NEGATED | ||
term = dict(operator='group-pm-with', operand=self.example_email("othello"), negated=True) | ||
self._do_add_term_test(term, 'WHERE recipient_id = recipient_id') | ||
self._do_add_term_test(term, 'WHERE 1 = 1') | ||
|
||
def test_add_term_using_group_pm_operator_with_non_existing_user_as_operand(self) -> None: | ||
term = dict(operator='group-pm-with', operand='[email protected]') | ||
|