mirror of
https://github.com/Thor77/TeamspeakStats.git
synced 2025-07-11 09:38:43 -04:00
test refactored tsstats.client.Clients correctly in test_ident_map.py
This commit is contained in:
parent
36790e3863
commit
d9f46e1b33
1 changed files with 10 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
from tsstats.client import Clients
|
from tsstats.client import Client, Clients
|
||||||
|
|
||||||
ident_map = {
|
ident_map = {
|
||||||
'1': '2',
|
'1': '2',
|
||||||
|
@ -7,13 +7,14 @@ ident_map = {
|
||||||
'UID5': 'UID2'
|
'UID5': 'UID2'
|
||||||
}
|
}
|
||||||
clients = Clients(ident_map)
|
clients = Clients(ident_map)
|
||||||
|
cl = Client('2', 'Client2')
|
||||||
|
uidcl = Client('UID2', 'Client2++')
|
||||||
|
clients += cl
|
||||||
|
clients += uidcl
|
||||||
|
|
||||||
|
|
||||||
def test_get_id():
|
def test_ident_map():
|
||||||
assert clients['1'].identifier == '2'
|
assert clients['1'] == cl
|
||||||
assert clients['5'].identifier == '2'
|
assert clients['5'] == cl
|
||||||
|
assert clients['UID1'] == uidcl
|
||||||
|
assert clients['UID5'] == uidcl
|
||||||
def test_get_uid():
|
|
||||||
assert clients['UID1'].identifier == 'UID2'
|
|
||||||
assert clients['UID5'].identifier == 'UID2'
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue