2016-05-19 09:43:10 -04:00
|
|
|
from tsstats.client import Client, Clients
|
2015-07-31 12:50:02 -04:00
|
|
|
|
|
|
|
ident_map = {
|
2015-07-31 16:53:09 -04:00
|
|
|
'1': '2',
|
|
|
|
'5': '2',
|
2015-07-31 12:50:02 -04:00
|
|
|
'UID1': 'UID2',
|
|
|
|
'UID5': 'UID2'
|
|
|
|
}
|
|
|
|
clients = Clients(ident_map)
|
2016-05-19 09:43:10 -04:00
|
|
|
cl = Client('2', 'Client2')
|
|
|
|
uidcl = Client('UID2', 'Client2++')
|
|
|
|
clients += cl
|
|
|
|
clients += uidcl
|
2015-07-31 12:50:02 -04:00
|
|
|
|
|
|
|
|
2016-05-19 09:43:10 -04:00
|
|
|
def test_ident_map():
|
|
|
|
assert clients['1'] == cl
|
|
|
|
assert clients['5'] == cl
|
|
|
|
assert clients['UID1'] == uidcl
|
|
|
|
assert clients['UID5'] == uidcl
|