def test_cee_to_ieee_ets_strict(): pgid = dcbtool.up2tc('012f45ff') assert {0: 0, 1: 1, 2: 2, 3: 15, 4: 4, 5: 5, 6: 15, 7: 15} == pgid tsa_map, up2tc = DCBModel.DCBTool.cee_to_ieee_ets(pgid) assert {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7} == up2tc assert tsa_map == {0: 'ets', 1: 'ets', 2: 'ets', 3: 'strict', 4: 'ets', 5: 'ets', 6: 'strict', 7: 'strict'} # assert dict((n, 'ets') for n in range(8)) == tsa_map pgid_str = DCBModel.DCBTool.ETS.get_pgid(up2tc, tsa_map) assert "pgid:012f45ff" == pgid_str
def test_cee_to_ieee_ets(): pgid = dcbtool.up2tc('77117716') tsa_map, up2tc = DCBModel.DCBTool.cee_to_ieee_ets(pgid) assert {0: 7, 1: 7, 2: 1, 3: 1, 4: 7, 5: 7, 6: 1, 7: 6} == up2tc assert dict((n, 'ets') for n in range(8)) == tsa_map