Mercurial > libervia-backend
comparison libervia/backend/test/test_plugin_misc_radiocol.py @ 4270:0d7bb4df2343
Reformatted code base using black.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 19 Jun 2024 18:44:57 +0200 |
parents | 4b842c1fb686 |
children |
comparison
equal
deleted
inserted
replaced
4269:64a85ce8be70 | 4270:0d7bb4df2343 |
---|---|
167 @param profile_index: profile index of the uploader | 167 @param profile_index: profile index of the uploader |
168 """ | 168 """ |
169 sent = self.host.get_sent_message(0) | 169 sent = self.host.get_sent_message(0) |
170 attrs["sender"] = self.plugin_0045.get_nick(0, profile_index) | 170 attrs["sender"] = self.plugin_0045.get_nick(0, profile_index) |
171 radiocol_elt = next(domish.generateElementsNamed(sent.elements(), "radiocol")) | 171 radiocol_elt = next(domish.generateElementsNamed(sent.elements(), "radiocol")) |
172 preload_elt = next(domish.generateElementsNamed( | 172 preload_elt = next( |
173 radiocol_elt.elements(), "preload" | 173 domish.generateElementsNamed(radiocol_elt.elements(), "preload") |
174 )) | 174 ) |
175 attrs["timestamp"] = preload_elt["timestamp"] # we could not guess it... | 175 attrs["timestamp"] = preload_elt["timestamp"] # we could not guess it... |
176 content = "<preload xmlns='' %s/>" % " ".join( | 176 content = "<preload xmlns='' %s/>" % " ".join( |
177 ["%s='%s'" % (attr, attrs[attr]) for attr in attrs] | 177 ["%s='%s'" % (attr, attrs[attr]) for attr in attrs] |
178 ) | 178 ) |
179 if sent.hasAttribute("from"): | 179 if sent.hasAttribute("from"): |
345 elt["filename"], | 345 elt["filename"], |
346 Const.PROFILE[profile_index], | 346 Const.PROFILE[profile_index], |
347 ) | 347 ) |
348 elif elt.name == "no_upload": | 348 elif elt.name == "no_upload": |
349 self.host.bridge.expect_call( | 349 self.host.bridge.expect_call( |
350 "radiocol_no_upload", ROOM_JID.full(), Const.PROFILE[profile_index] | 350 "radiocol_no_upload", |
351 ROOM_JID.full(), | |
352 Const.PROFILE[profile_index], | |
351 ) | 353 ) |
352 sync_data[nick] | 354 sync_data[nick] |
353 self._room_game_cmd(sent, []) | 355 self._room_game_cmd(sent, []) |
354 | 356 |
355 def _join_room(self, room, nicks, player_index, sync=True): | 357 def _join_room(self, room, nicks, player_index, sync=True): |