def test_cee_app(self):
     p = lldptool.parse(lldptool_ti)
     assert p['CEE DCBX TLV']['Application TLV:']['Applications'] == {
         ('Ethertype', 35078): 8,
         ('Ethertype', 35092): 8,
         ('TCP/UDP Port', 3260): 16,
     }
 def from_lldptool(cls, output):
     """
     :rtype: DCBModel
     """
     tlvs = lldptool.parse(output)
     # TODO: what if there is both CEE and IEEE?
     if "CEE DCBX TLV" in tlvs:
         return cls.from_lldptool_cee(tlvs)
     elif "IEEE 8021QAZ PFC TLV" in tlvs:
         return cls.from_lldptool_ieee(tlvs)
 def test_ieee_pfc(self):
     p = lldptool.parse(ieee_lldptool_pfc)
     # assert p['CEE DCBX TLV']['Priority Groups TLV:'] == {}
     assert p['IEEE 8021QAZ PFC TLV']['PFC enabled'] == {
         0: False,
         1: True,
         2: True,
         3: False,
         4: False,
         5: True,
         6: False,
         7: True
     }
 def test_pg(self):
     p = lldptool.parse(lldptool_ti)
     # assert p['CEE DCBX TLV']['Priority Groups TLV:'] == {}
     assert p['CEE DCBX TLV']['Priority Groups TLV:']['PGID Priorities'] == \
         {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7}