mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:26:09 -04:00
Move NullSource out of synapse and into tests since it is only used by the tests
This commit is contained in:
parent
7a5818ed81
commit
bb4dddd6c4
2 changed files with 17 additions and 17 deletions
|
@ -23,22 +23,6 @@ from synapse.handlers.typing import TypingNotificationEventSource
|
|||
from synapse.handlers.receipts import ReceiptEventSource
|
||||
|
||||
|
||||
class NullSource(object):
|
||||
"""This event source never yields any events and its token remains at
|
||||
zero. It may be useful for unit-testing."""
|
||||
def __init__(self, hs):
|
||||
pass
|
||||
|
||||
def get_new_events_for_user(self, user, from_key, limit):
|
||||
return defer.succeed(([], from_key))
|
||||
|
||||
def get_current_key(self, direction='f'):
|
||||
return defer.succeed(0)
|
||||
|
||||
def get_pagination_rows(self, user, pagination_config, key):
|
||||
return defer.succeed(([], pagination_config.from_key))
|
||||
|
||||
|
||||
class EventSources(object):
|
||||
SOURCE_TYPES = {
|
||||
"room": RoomEventSource,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue