Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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