Skip to content

Commit

Permalink
Test that we handle string read receipt data
Browse files Browse the repository at this point in the history
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
  • Loading branch information
SimonBrandner authored and aaronraimist committed Aug 15, 2021
1 parent 2ada26b commit 992619c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/handlers/test_receipts.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,36 @@ def test_filters_out_receipt_event_with_only_hidden_receipt_and_ignores_rest(sel
],
)

def test_handles_string_data(self):
self._test_filters_hidden(
[
{
"content": {
"$14356419edgd14394fHBLK:matrix.org": {
"m.read": {
"@rikj:jki.re": "string",
}
},
},
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"type": "m.receipt",
},
],
[
{
"content": {
"$14356419edgd14394fHBLK:matrix.org": {
"m.read": {
"@rikj:jki.re": "string",
}
},
},
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"type": "m.receipt",
},
],
)

def _test_filters_hidden(
self, events: List[JsonDict], expected_output: List[JsonDict]
):
Expand Down

0 comments on commit 992619c

Please sign in to comment.