예제 #1
0
 def test_fail(self):
     errstr = "ndef.record.Record NDEF Record TNF values must be 0 to 6"
     with pytest.raises((TypeError, ValueError)) as excinfo:
         Record._decode_type(7, b'')
     assert str(excinfo.value) == errstr
예제 #2
0
 def test_fail(self):
     errstr = "ndef.record.Record NDEF Record TNF values must be 0 to 6"
     with pytest.raises((TypeError, ValueError)) as excinfo:
         Record._decode_type(7, b'')
     assert str(excinfo.value) == errstr
예제 #3
0
 def test_pass(self, record_type, TNF, TYPE):
     assert Record._decode_type(TNF, TYPE) == record_type
     assert type(Record._decode_type(TNF, TYPE)) == str
예제 #4
0
 def test_pass(self, record_type, TNF, TYPE):
     assert Record._decode_type(TNF, TYPE) == record_type
     assert type(Record._decode_type(TNF, TYPE)) == str