mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-17 15:31:19 +01:00
update filtering tests
This commit is contained in:
parent
2fa9e23e04
commit
8897781558
1 changed files with 6 additions and 6 deletions
|
@ -345,9 +345,9 @@ class FilteringTestCase(unittest.TestCase):
|
||||||
)
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def test_filter_public_user_data_match(self):
|
def test_filter_presence_match(self):
|
||||||
user_filter_json = {
|
user_filter_json = {
|
||||||
"public_user_data": {
|
"presence": {
|
||||||
"types": ["m.*"]
|
"types": ["m.*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -368,13 +368,13 @@ class FilteringTestCase(unittest.TestCase):
|
||||||
filter_id=filter_id,
|
filter_id=filter_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
results = user_filter.filter_public_user_data(events=events)
|
results = user_filter.filter_presence(events=events)
|
||||||
self.assertEquals(events, results)
|
self.assertEquals(events, results)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def test_filter_public_user_data_no_match(self):
|
def test_filter_presence_no_match(self):
|
||||||
user_filter_json = {
|
user_filter_json = {
|
||||||
"public_user_data": {
|
"presence": {
|
||||||
"types": ["m.*"]
|
"types": ["m.*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -395,7 +395,7 @@ class FilteringTestCase(unittest.TestCase):
|
||||||
filter_id=filter_id,
|
filter_id=filter_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
results = user_filter.filter_public_user_data(events=events)
|
results = user_filter.filter_presence(events=events)
|
||||||
self.assertEquals([], results)
|
self.assertEquals([], results)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
|
Loading…
Reference in a new issue