Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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