Skip to content

Commit bc1df48

Browse files
mesh-2092: black changes
1 parent 09c5e62 commit bc1df48

2 files changed

Lines changed: 6 additions & 16 deletions

File tree

src/mesh_sandbox/tests/helpers.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ def ensure_client_installed(java_path: str, base_dir: str, version: str): # pyl
8686

8787
install_xml = os.path.join(installer_dir, "auto-install.xml")
8888
with open(install_xml, "w+", encoding="utf-8") as f:
89-
f.write(
90-
f"""<?xml version="1.0" encoding="UTF-8" standalone="no"?>
89+
f.write(f"""<?xml version="1.0" encoding="UTF-8" standalone="no"?>
9190
<AutomatedInstallation langpack="eng">
9291
<com.izforge.izpack.panels.hello.HelloPanel id="HelloPanel_0"/>
9392
<com.izforge.izpack.panels.target.TargetPanel id="TargetPanel_1">
@@ -107,8 +106,7 @@ def ensure_client_installed(java_path: str, base_dir: str, version: str): # pyl
107106
<com.izforge.izpack.panels.install.InstallPanel id="InstallPanel_7"/>
108107
<com.izforge.izpack.panels.process.ProcessPanel id="ProcessPanel_8"/>
109108
<com.izforge.izpack.panels.finish.FinishPanel id="FinishPanel_9"/>
110-
</AutomatedInstallation>"""
111-
)
109+
</AutomatedInstallation>""")
112110

113111
subprocess.check_call(f"{java_path} -jar {installer_jar} {install_xml}".split(" "))
114112

src/mesh_sandbox/tests/java_client_tests.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,7 @@ def configure_mailboxes(base_dir: str, mailboxes: list[str]):
8989
for mailbox in mailboxes:
9090
mailbox = mailbox.strip().upper()
9191
mailbox_path = os.path.abspath(f"{base_dir}/data/{mailbox}")
92-
root.append(
93-
etree.fromstring(
94-
dedent(
95-
f"""<Client>
92+
root.append(etree.fromstring(dedent(f"""<Client>
9693
<ClientIdentity>{mailbox}</ClientIdentity>
9794
<ClientAuthentication>password</ClientAuthentication>
9895
<MailboxType>MESH</MailboxType>
@@ -101,10 +98,7 @@ def configure_mailboxes(base_dir: str, mailboxes: list[str]):
10198
<TransferReport>N</TransferReport>
10299
<PollReport>N</PollReport>
103100
<SaveSent>Y</SaveSent>
104-
</Client>"""
105-
)
106-
)
107-
)
101+
</Client>""")))
108102
shutil.copytree(f"{base_dir}/data/_TEMPLATE", mailbox_path)
109103

110104
root.getroottree().write(java_client_config_path, pretty_print=True)
@@ -127,8 +121,7 @@ def send_message(
127121
dat_file.write(data)
128122

129123
with open(f"{file_path}.ctl", "w", encoding="utf8") as ctl_file:
130-
ctl_file.write(
131-
f"""<DTSControl>
124+
ctl_file.write(f"""<DTSControl>
132125
<Version>1.0</Version>
133126
<AddressType>DTS</AddressType>
134127
<MessageType>Data</MessageType>
@@ -140,8 +133,7 @@ def send_message(
140133
<Compress>{'Y' if compress else 'N'}</Compress>
141134
<AllowChunking>Y</AllowChunking>
142135
<Encrypted>N</Encrypted>
143-
</DTSControl>"""
144-
)
136+
</DTSControl>""")
145137

146138
sleep(1.5) # have to wait as client will not pick up files added < 1 sec ago
147139
return file_name

0 commit comments

Comments
 (0)