| Conditions | 1 |
| Total Lines | 18 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """ |
||
| 13 | @pytest.mark.parametrize( |
||
| 14 | 'channels, text', |
||
| 15 | [ |
||
| 16 | (['#example' ], 'ohai, kthxbye!' ), |
||
| 17 | (['#partyline', '#idlers'], 'Nothing to see here, move along.'), |
||
| 18 | ], |
||
| 19 | ) |
||
| 20 | def test_from_json(channels, text): |
||
| 21 | data = { |
||
| 22 | 'channels': channels, |
||
| 23 | 'text': text, |
||
| 24 | } |
||
| 25 | json_data = json.dumps(data) |
||
| 26 | |||
| 27 | message = Message.from_json(json_data) |
||
| 28 | |||
| 29 | assert message.channels == frozenset(channels) |
||
| 30 | assert message.text == text |
||
| 31 |