Add test for Client.nick-property
This commit is contained in:
parent
3acf282470
commit
7077446627
|
@ -36,6 +36,18 @@ def test_client_repr(clients):
|
||||||
assert str(clients['UID2']) == '<UID2, None>'
|
assert str(clients['UID2']) == '<UID2, None>'
|
||||||
|
|
||||||
|
|
||||||
|
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):
|
def test_clients_iter(clients):
|
||||||
clients, cl1, cl2, uidcl1, uidcl2 = clients
|
clients, cl1, cl2, uidcl1, uidcl2 = clients
|
||||||
client_list = list(iter(clients))
|
client_list = list(iter(clients))
|
||||||
|
|
Loading…
Reference in New Issue