Add regression test for dc_set_chat_mute_duration panic

Panic was fixed in 3c8e60a2a3
This commit is contained in:
Alexander Krotov
2020-08-07 00:54:16 +03:00
committed by link2xt
parent 6d68fd4500
commit 24d0382ec3

View File

@@ -288,6 +288,11 @@ class TestOfflineChat:
with pytest.raises(ValueError):
chat.mute(-51)
# Regression test, this caused Rust panic previously
chat.mute(2**63 - 1)
assert chat.is_muted()
assert chat.get_mute_duration() == -1
def test_delete_and_send_fails(self, ac1, chat1):
chat1.delete()
ac1._evtracker.wait_next_messages_changed()