diff --git a/tsstats/tests/test_client.py b/tsstats/tests/test_client.py index 2f28661..7ebdb25 100644 --- a/tsstats/tests/test_client.py +++ b/tsstats/tests/test_client.py @@ -36,6 +36,18 @@ def test_client_repr(clients): assert str(clients['UID2']) == '' +def test_client_nick(clients): + _, cl1, _, _, _ = clients + assert cl1.nick is None + assert not cl1.nick_history + cl1.nick = 'Client1' + assert cl1.nick == 'Client1' + assert None not in cl1.nick_history + cl1.nick = 'NewClient1' + assert cl1.nick == 'NewClient1' + assert 'Client1' in cl1.nick_history + + def test_clients_iter(clients): clients, cl1, cl2, uidcl1, uidcl2 = clients client_list = list(iter(clients))