From 43241250b6fd1cf5bcbf58e2e78236f2e7ed191b Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sat, 18 Apr 2020 16:15:11 -0700 Subject: [PATCH] test_alert_words: Use better variable names. --- zerver/tests/test_alert_words.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/zerver/tests/test_alert_words.py b/zerver/tests/test_alert_words.py index 250b256baa..b2981d7c6a 100644 --- a/zerver/tests/test_alert_words.py +++ b/zerver/tests/test_alert_words.py @@ -63,16 +63,15 @@ class AlertWordTests(ZulipTestCase): """ user = self.example_user('cordelia') + expected_remaining_alerts = set(self.interesting_alert_word_list) add_user_alert_words(user, self.interesting_alert_word_list) - theoretical_remaining_alerts = self.interesting_alert_word_list[:] - for alert_word in self.interesting_alert_word_list: remove_user_alert_words(user, alert_word) - theoretical_remaining_alerts.remove(alert_word) + expected_remaining_alerts.remove(alert_word) actual_remaining_alerts = user_alert_words(user) self.assertEqual(set(actual_remaining_alerts), - set(theoretical_remaining_alerts)) + expected_remaining_alerts) def test_realm_words(self) -> None: """