Exemple #1
0
 def test_str(self):
     tco = nfc.llcp.tco.LogicalDataLink(128)
     assert str(tco) == "LDL None -> None"
     tco.bind(1)
     assert str(tco) == "LDL  1 -> None"
     tco.connect(1)
     assert str(tco) == "LDL  1 ->  1"
Exemple #2
0
 def test_str(self):
     tco = nfc.llcp.tco.LogicalDataLink(128)
     assert str(tco) == "LDL None -> None"
     tco.bind(1)
     assert str(tco) == "LDL  1 -> None"
     tco.connect(1)
     assert str(tco) == "LDL  1 ->  1"
 def test_str(self):
     tco = nfc.llcp.tco.DataLinkConnection(128, 1)
     assert str(tco) == \
         "DLC None <-> None CLOSED RW(R)=None " \
         "V(S)=0 V(SA)=0 RW(L)=1 V(R)=0 V(RA)=0"
     tco.bind(1)
     assert str(tco) == \
         "DLC  1 <-> None CLOSED RW(R)=None " \
         "V(S)=0 V(SA)=0 RW(L)=1 V(R)=0 V(RA)=0"
Exemple #4
0
 def test_str(self):
     tco = nfc.llcp.tco.DataLinkConnection(128, 1)
     assert str(tco) == \
         "DLC None <-> None CLOSED RW(R)=None " \
         "V(S)=0 V(SA)=0 RW(L)=1 V(R)=0 V(RA)=0"
     tco.bind(1)
     assert str(tco) == \
         "DLC  1 <-> None CLOSED RW(R)=None " \
         "V(S)=0 V(SA)=0 RW(L)=1 V(R)=0 V(RA)=0"
Exemple #5
0
 def tco(self):
     tco = nfc.llcp.tco.LogicalDataLink(128)
     assert tco.state.ESTABLISHED is True
     assert tco.bind(1) == 1
     yield tco
     tco.close()
     assert tco.state.SHUTDOWN is True
Exemple #6
0
 def tco(self):
     tco = nfc.llcp.tco.LogicalDataLink(128)
     assert tco.state.ESTABLISHED is True
     assert tco.bind(1) == 1
     yield tco
     tco.close()
     assert tco.state.SHUTDOWN is True
Exemple #7
0
 def test_bind(self, tco):
     assert tco.bind(1) == 1 and tco.is_bound is True
     assert tco.bind(1) == 1 and tco.is_bound is True
     assert tco.bind(2) == 2 and tco.is_bound is True
     assert tco.bind(None) is None and tco.is_bound is False
Exemple #8
0
 def test_str(self, tco):
     assert str(tco) == "RAW None ->  ?"
     tco.bind(1)
     assert str(tco) == "RAW  1 ->  ?"
 def tco(self):
     tco = nfc.llcp.tco.DataLinkConnection(128, 1)
     assert tco.state.CLOSED is True
     assert tco.bind(16) == 16
     return tco
Exemple #10
0
 def test_bind(self, tco):
     assert tco.bind(1) == 1 and tco.is_bound is True
     assert tco.bind(1) == 1 and tco.is_bound is True
     assert tco.bind(2) == 2 and tco.is_bound is True
     assert tco.bind(None) is None and tco.is_bound is False
Exemple #11
0
 def tco(self):
     tco = nfc.llcp.tco.DataLinkConnection(128, 1)
     assert tco.state.CLOSED is True
     assert tco.bind(16) == 16
     return tco
Exemple #12
0
 def test_str(self, tco):
     assert str(tco) == "RAW None ->  ?"
     tco.bind(1)
     assert str(tco) == "RAW  1 ->  ?"