mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-08 19:02:14 -04:00
[pyupgrade] tests/
(#10347)
This commit is contained in:
parent
879d8c1ee1
commit
89cfc3dd98
20 changed files with 45 additions and 58 deletions
|
@ -43,7 +43,7 @@ class ConfigLoadingTestCase(unittest.TestCase):
|
|||
def test_generates_and_loads_macaroon_secret_key(self):
|
||||
self.generate_config()
|
||||
|
||||
with open(self.file, "r") as f:
|
||||
with open(self.file) as f:
|
||||
raw = yaml.safe_load(f)
|
||||
self.assertIn("macaroon_secret_key", raw)
|
||||
|
||||
|
@ -120,7 +120,7 @@ class ConfigLoadingTestCase(unittest.TestCase):
|
|||
def generate_config_and_remove_lines_containing(self, needle):
|
||||
self.generate_config()
|
||||
|
||||
with open(self.file, "r") as f:
|
||||
with open(self.file) as f:
|
||||
contents = f.readlines()
|
||||
contents = [line for line in contents if needle not in line]
|
||||
with open(self.file, "w") as f:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue