Example #1
0
 def test_fail(self, record_type, errstr):
     with pytest.raises((TypeError, ValueError)) as excinfo:
         Record._encode_type(record_type)
     assert str(excinfo.value) == "ndef.record.Record " + errstr
Example #2
0
 def test_fail(self, record_type, errstr):
     with pytest.raises((TypeError, ValueError)) as excinfo:
         Record._encode_type(record_type)
     assert str(excinfo.value) == "ndef.record.Record " + errstr
Example #3
0
 def test_pass(self, record_type, TNF, TYPE):
     assert Record._encode_type(record_type) == (TNF, TYPE)
     assert type(Record._encode_type(record_type)[1]) == bytes
Example #4
0
 def test_pass(self, record_type, TNF, TYPE):
     assert Record._encode_type(record_type) == (TNF, TYPE)
     assert type(Record._encode_type(record_type)[1]) == bytes