Skip to content

Fix tests after 4b23632cf859515d067b0abd55b71c657c62be87 #1405

Fix tests after 4b23632cf859515d067b0abd55b71c657c62be87

Fix tests after 4b23632cf859515d067b0abd55b71c657c62be87 #1405

GitHub Actions / JUnit Test Report failed Sep 30, 2024 in 0s

1283 tests run, 1280 passed, 1 skipped, 2 failed.

Annotations

Check failure on line 1 in TestBalanceEstimation

@github-actions github-actions / JUnit Test Report

TestBalanceEstimation.test_last_not_booked__current_not_booked

AssertionError: assert Decimal('-5') == Decimal('0.00')
  +Decimal('-5')
  -Decimal('0.00')
Raw output
tests/lib/test_finance.py:609: in test_last_not_booked__current_not_booked
    check_current_and_next_month(Decimal(-5))
tests/lib/test_finance.py:567: in _check_current_and_next_month
    assert base == estimate_balance(session, user, in_grace_current_month)
E   AssertionError: assert Decimal('-5') == Decimal('0.00')
E     +Decimal('-5')
E     -Decimal('0.00')

Check failure on line 1 in TestReturnNonAttributable

@github-actions github-actions / JUnit Test Report

TestReturnNonAttributable.test_generate_sepa_xml

sepaxml.validation.ValidationError: The output SEPA file contains validation errors. This is likely due to an illegal value in one of your input fields.
Raw output
../venv/lib/python3.11/site-packages/sepaxml/validation.py:12: in try_valid_xml
    my_schema.validate(xmlout.decode())
../venv/lib/python3.11/site-packages/xmlschema/validators/schemas.py:1702: in validate
    raise error
../venv/lib/python3.11/site-packages/xmlschema/validators/simple_types.py:1389: in iter_decode
    self.patterns(obj)
../venv/lib/python3.11/site-packages/xmlschema/validators/facets.py:729: in __call__
    raise XMLSchemaValidationError(self, text, reason)
E   xmlschema.validators.exceptions.XMLSchemaValidationError: failed validating 'JVHLGB0TOMF' with XsdPatternFacets(['[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}']):
E   
E   Reason: value doesn't match any pattern of ['[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}']
E   
E   Schema component:
E   
E     <xs:pattern xmlns:xs="http://www.w3.org/2001/XMLSchema" value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}" />
E   
E   Instance type: <class 'xml.etree.ElementTree.Element'>
E   
E   Instance:
E   
E     <BIC xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03">JVHLGB0TOMF</BIC>
E   
E   Path: /Document/CstmrCdtTrfInitn/PmtInf[2]/CdtTrfTxInf/CdtrAgt/FinInstnId/BIC

The above exception was the direct cause of the following exception:
tests/lib/test_finance.py:724: in test_generate_sepa_xml
    generate_activities_return_sepaxml(get_activities_to_return(session))
pycroft/lib/finance/retransfer.py:48: in generate_activities_return_sepaxml
    return sepa.export()
../venv/lib/python3.11/site-packages/sepaxml/shared.py:99: in export
    try_valid_xml(out, self.schema)
../venv/lib/python3.11/site-packages/sepaxml/validation.py:15: in try_valid_xml
    raise ValidationError(
E   sepaxml.validation.ValidationError: The output SEPA file contains validation errors. This is likely due to an illegal value in one of your input fields.