feat: improve name of function

pull/111/head
Kevin ICOL 4 years ago
parent 02e2d2f7a5
commit 750c99bbe7
  1. 2
      synapse/handlers/room.py
  2. 4
      synapse/storage/databases/main/room.py
  3. 4
      tests/handlers/watcha_test_room.py
  4. 2
      tests/rest/client/v1/test_rooms.py
  5. 2
      tests/rest/client/v1/test_watcha.py
  6. 4
      tests/storage/test_room.py

@ -1490,7 +1490,7 @@ class WatchaRoomNextcloudMappingHandler(BaseHandler):
nextcloud_requester, nextcloud_directory_path, room_id
)
await self.store.set_room_mapping_with_nextcloud_directory(
await self.store.map_room_with_nextcloud_directory(
room_id, nextcloud_directory_path, new_share_id
)

@ -1637,7 +1637,7 @@ class RoomStore(RoomBackgroundUpdateStore, RoomWorkerStore, SearchStore):
desc="get_nextcloud_share_id_from_roomID",
)
async def set_room_mapping_with_nextcloud_directory(
async def map_room_with_nextcloud_directory(
self, room_id, directory_path, share_id
):
""" Set mapping between Watcha room and Nextcloud directory.
@ -1651,7 +1651,7 @@ class RoomStore(RoomBackgroundUpdateStore, RoomWorkerStore, SearchStore):
"directory_path": directory_path,
"share_id": share_id,
},
desc="set_room_mapping_with_nextcloud_directory",
desc="map_room_with_nextcloud_directory",
)
async def deleted_room_mapping_with_nextcloud_directory(self, room_id):

@ -105,7 +105,7 @@ class WatchaRoomNextcloudMappingTestCase(unittest.HomeserverTestCase):
def test_update_existing_room_nextcloud_mapping(self):
self.get_success(
self.store.set_room_mapping_with_nextcloud_directory(
self.store.map_room_with_nextcloud_directory(
self.room_id, "/directory", 2
)
)
@ -143,7 +143,7 @@ class WatchaRoomNextcloudMappingTestCase(unittest.HomeserverTestCase):
def test_delete_existing_room_nextcloud_mapping(self):
self.get_success(
self.store.set_room_mapping_with_nextcloud_directory(
self.store.map_room_with_nextcloud_directory(
self.room_id, "/directory", 2
)
)

@ -2237,7 +2237,7 @@ class WatchaMembershipNextcloudSharingTestCase(unittest.HomeserverTestCase):
# map a room with a Nextcloud directory :
self.get_success(
self.store.set_room_mapping_with_nextcloud_directory(
self.store.map_room_with_nextcloud_directory(
self.room_id, "/directory", 1
)
)

@ -401,7 +401,7 @@ class WatchaSendNextcloudActivityToWatchaRoomServletTestCase(
room_id = self._create_room()
mapping_value["room_id"] = room_id
await self.store.set_room_mapping_with_nextcloud_directory(
await self.store.map_room_with_nextcloud_directory(
room_id, mapping_value["path"], mapping_value["share_id"]
)

@ -177,7 +177,7 @@ class WatchaRoomEventsStoreTestCase(unittest.HomeserverTestCase):
# Set mapping between a room and a nextcloud directory :
yield defer.ensureDeferred(
self.store.set_room_mapping_with_nextcloud_directory(
self.store.map_room_with_nextcloud_directory(
self.room_id, self.directory_path, self.share_id
)
)
@ -221,7 +221,7 @@ class WatchaRoomEventsStoreTestCase(unittest.HomeserverTestCase):
new_share_id = 2
yield defer.ensureDeferred(
self.store.set_room_mapping_with_nextcloud_directory(
self.store.map_room_with_nextcloud_directory(
self.room_id, new_directory_path, new_share_id
)
)

Loading…
Cancel
Save