rename get_prev_events_for_room to get_prev_events_and_hashes_for_room

... to make way for a new method which just returns the event ids
This commit is contained in:
Richard van der Hoff 2020-01-03 15:31:09 +00:00
parent 01c3c6c929
commit 5a04781643
4 changed files with 12 additions and 7 deletions

View file

@ -26,7 +26,7 @@ class EventFederationWorkerStoreTestCase(tests.unittest.TestCase):
self.store = hs.get_datastore()
@defer.inlineCallbacks
def test_get_prev_events_for_room(self):
def test_get_prev_events_and_hashes_for_room(self):
room_id = "@ROOM:local"
# add a bunch of events and hashes to act as forward extremities
@ -64,7 +64,7 @@ class EventFederationWorkerStoreTestCase(tests.unittest.TestCase):
yield self.store.db.runInteraction("insert", insert_event, i)
# this should get the last five and five others
r = yield self.store.get_prev_events_for_room(room_id)
r = yield self.store.get_prev_events_and_hashes_for_room(room_id)
self.assertEqual(10, len(r))
for i in range(0, 5):
el = r[i]