From 24d0382ec33a8b750cd624114f6138300646a115 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Fri, 7 Aug 2020 00:54:16 +0300 Subject: [PATCH] Add regression test for dc_set_chat_mute_duration panic Panic was fixed in 3c8e60a2a305d96d8082faf7332f1d3f0485c437 --- python/tests/test_account.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/tests/test_account.py b/python/tests/test_account.py index 6b016b20e..4757d8fe6 100644 --- a/python/tests/test_account.py +++ b/python/tests/test_account.py @@ -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()