def test_identify_redact_fields_redact_all_false_overrides(): fields = gateway.identify_redact_fields() assert fields['name']['redact'] is False assert fields['number']['redact'] is False assert fields['expiry']['redact'] is False assert fields['cvv']['redact'] is False assert fields['type']['redact'] is False assert fields['token']['redact'] is False assert fields['mag']['redact'] is False assert fields['mag_enc']['redact'] is False
def test_identify_redact_fields_defaults(): fields = gateway.identify_redact_fields() # Length is tested to warn of any changes to fields assert len(fields) == 8 assert fields['name']['redact'] is True assert fields['number']['redact'] is True assert fields['expiry']['redact'] is True assert fields['cvv']['redact'] is True assert fields['type']['redact'] is True assert fields['token']['redact'] is False assert fields['mag']['redact'] is True assert fields['mag_enc']['redact'] is True
def test_identify_redact_fields_redact_mag_enc_false(): fields = gateway.identify_redact_fields() assert fields['mag_enc']['redact'] is False
def test_identify_redact_fields_redact_mag_true(): fields = gateway.identify_redact_fields() assert fields['mag']['redact'] is True
def test_identify_redact_fields_redact_token_false(): fields = gateway.identify_redact_fields() assert fields['token']['redact'] is False
def test_identify_redact_fields_redact_type_true(): fields = gateway.identify_redact_fields() assert fields['type']['redact'] is True
def test_identify_redact_fields_redact_cvv_false(): fields = gateway.identify_redact_fields() assert fields['cvv']['redact'] is False
def test_identify_redact_fields_redact_expiry_false(): fields = gateway.identify_redact_fields() assert fields['expiry']['redact'] is False
def test_identify_redact_fields_redact_number_false(): fields = gateway.identify_redact_fields() assert fields['number']['redact'] is False