def test_segment_json_is_invalid_non_zero_sequence_with_segment_count(self): json_ser = '{"i": "1000", "t": "w]8f<vRG}fayY4]vRG}fayYm#vRG}fayYnc", "c": 1, "s": 2}' json_obj = json.loads(json_ser) assert not TxTennaSegment.segment_json_is_valid(json_obj)
def test_segment_json_first_is_valid_explicit_zero_sequence(self): json_ser = '{"i": "1000", "t": "w]8f<vRG}fayY4]vRG}fayYm#vRG}fayYnc", "s": 1, "h": "123abc", "c": 0}' json_obj = json.loads(json_ser) assert TxTennaSegment.segment_json_is_valid(json_obj)