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
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
def test_pass(self, record_type, TNF, TYPE): assert Record._decode_type(TNF, TYPE) == record_type assert type(Record._decode_type(TNF, TYPE)) == str
def test_pass(self, record_type, TNF, TYPE): assert Record._decode_type(TNF, TYPE) == record_type assert type(Record._decode_type(TNF, TYPE)) == str