From 0189644f08938e21c61877bec8355223453a4b29 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Fri, 3 Jan 2020 10:03:41 +0300 Subject: [PATCH] Add python test for autodelete timer API --- python/tests/test_account.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/python/tests/test_account.py b/python/tests/test_account.py index a3378f2f5..e222f3c90 100644 --- a/python/tests/test_account.py +++ b/python/tests/test_account.py @@ -1473,6 +1473,18 @@ class TestOnlineAccount: locations3 = chat2.get_locations(contact=contact) assert not locations3 + def test_autodelete_timer(self, acfactory, lp): + ac1, ac2 = acfactory.get_two_online_accounts() + + lp.sec("create unpromoted group chat") + chat = ac1.create_group_chat("hello") + + chat.set_autodelete_timer(60) + + assert chat.get_autodelete_timer() == 60 + + d = chat.get_summary() + assert d["autodelete_timer"] == 60 class TestGroupStressTests: def test_group_many_members_add_leave_remove(self, acfactory, lp):