mirror of https://github.com/zulip/zulip.git
python: Further pyupgrade changes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
333f7d16c9
commit
f5b33f9398
|
@ -1,5 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright © 2013 Zulip, Inc.
|
||||
#
|
||||
|
@ -42,7 +41,6 @@ interfaces.
|
|||
|
||||
'''
|
||||
|
||||
from __future__ import absolute_import
|
||||
import sys
|
||||
import logging
|
||||
import logging.handlers
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations
|
||||
from django.db.backends.postgresql.schema import DatabaseSchemaEditor
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from django.db import migrations
|
||||
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
|
||||
from django.db.migrations.state import StateApps
|
||||
|
|
|
@ -66,14 +66,14 @@ class AlertWordTests(ZulipTestCase):
|
|||
self.assert_length(realm_alert_words[user.id], 3)
|
||||
|
||||
# Test the case-insensitivity of adding words
|
||||
do_add_alert_words(user, set(["ALert", "ALERT"]))
|
||||
do_add_alert_words(user, {"ALert", "ALERT"})
|
||||
words = user_alert_words(user)
|
||||
self.assertEqual(set(words), set(self.interesting_alert_word_list))
|
||||
realm_alert_words = alert_words_in_realm(user.realm)
|
||||
self.assert_length(realm_alert_words[user.id], 3)
|
||||
|
||||
# Test the case-insensitivity of removing words
|
||||
do_remove_alert_words(user, set(["ALert"]))
|
||||
do_remove_alert_words(user, {"ALert"})
|
||||
words = user_alert_words(user)
|
||||
self.assertEqual(set(words), set(self.interesting_alert_word_list) - {'alert'})
|
||||
realm_alert_words = alert_words_in_realm(user.realm)
|
||||
|
|
|
@ -2840,8 +2840,8 @@ class ExternalMethodDictsTests(ZulipTestCase):
|
|||
external_auth_methods = get_external_method_dicts(get_realm("zephyr"))
|
||||
# Both idps enabled for the zephyr realm, + github auth.
|
||||
self.assert_length(external_auth_methods, 3)
|
||||
self.assertEqual(set([external_auth_methods[0]['name'], external_auth_methods[1]['name']]),
|
||||
set(['saml:test_idp', 'saml:test_idp2']))
|
||||
self.assertEqual({external_auth_methods[0]['name'], external_auth_methods[1]['name']},
|
||||
{'saml:test_idp', 'saml:test_idp2'})
|
||||
|
||||
class FetchAuthBackends(ZulipTestCase):
|
||||
def assert_on_error(self, error: Optional[str]) -> None:
|
||||
|
|
Loading…
Reference in New Issue