mock-einvoice 0.3.0__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/CHANGELOG.md +54 -0
  2. {mock_einvoice-0.3.0/mock_einvoice.egg-info → mock_einvoice-0.4.0}/PKG-INFO +53 -5
  3. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/README.md +51 -4
  4. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0/mock_einvoice.egg-info}/PKG-INFO +53 -5
  5. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mock_einvoice.egg-info/SOURCES.txt +3 -0
  6. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/__init__.py +1 -1
  7. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/buyer.py +5 -3
  8. mock_einvoice-0.4.0/mockeinvoice/clock.py +128 -0
  9. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/server.py +55 -10
  10. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/supplier.py +7 -4
  11. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/ubl.py +150 -9
  12. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/pyproject.toml +2 -1
  13. mock_einvoice-0.4.0/tests/test_binding.py +330 -0
  14. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_buyer.py +2 -2
  15. mock_einvoice-0.4.0/tests/test_clock.py +156 -0
  16. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_order.py +1 -1
  17. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_server.py +149 -10
  18. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_supplier.py +2 -2
  19. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/LICENSE +0 -0
  20. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/MANIFEST.in +0 -0
  21. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mock_einvoice.egg-info/dependency_links.txt +0 -0
  22. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mock_einvoice.egg-info/entry_points.txt +0 -0
  23. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mock_einvoice.egg-info/top_level.txt +0 -0
  24. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/__main__.py +0 -0
  25. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/model.py +0 -0
  26. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/order.py +0 -0
  27. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/response.py +0 -0
  28. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/LICENSE-EUPL-1.2.txt +0 -0
  29. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/__init__.py +0 -0
  30. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/calculation.py +0 -0
  31. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/codelists.py +0 -0
  32. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/en16931.py +0 -0
  33. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/en16931_codes.py +0 -0
  34. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/en16931_ubl.py +0 -0
  35. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/en16931_vat.py +0 -0
  36. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/german.py +0 -0
  37. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/peppol.py +0 -0
  38. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/peppol_de.py +0 -0
  39. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/peppol_national.py +0 -0
  40. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/peppol_response.py +0 -0
  41. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/published.py +0 -0
  42. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/tree.py +0 -0
  43. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/ublsyntax.py +0 -0
  44. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/untdid.py +0 -0
  45. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/rules/xrechnung.py +0 -0
  46. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/mockeinvoice/specification.py +0 -0
  47. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/setup.cfg +0 -0
  48. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/__init__.py +0 -0
  49. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/FT G2G_TD01 con Allegato, Bonifico e Split Payment.xml +0 -0
  50. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/LICENSE-EUPL-1.2.txt +0 -0
  51. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/README.md +0 -0
  52. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/guide-example1.xml +0 -0
  53. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/guide-example2.xml +0 -0
  54. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/guide-example3.xml +0 -0
  55. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/issue116.xml +0 -0
  56. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/sample-discount-price.xml +0 -0
  57. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/ubl-tc434-creditnote1.xml +0 -0
  58. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/ubl-tc434-example1.xml +0 -0
  59. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/ubl-tc434-example10.xml +0 -0
  60. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/ubl-tc434-example2.xml +0 -0
  61. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/ubl-tc434-example3.xml +0 -0
  62. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/ubl-tc434-example4.xml +0 -0
  63. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/ubl-tc434-example5.xml +0 -0
  64. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/ubl-tc434-example6.xml +0 -0
  65. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/ubl-tc434-example7.xml +0 -0
  66. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/ubl-tc434-example8.xml +0 -0
  67. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/ubl-tc434-example9.xml +0 -0
  68. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-01.xml +0 -0
  69. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-02.xml +0 -0
  70. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-03.xml +0 -0
  71. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-04.xml +0 -0
  72. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-05.xml +0 -0
  73. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-06.xml +0 -0
  74. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-07.xml +0 -0
  75. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-08.xml +0 -0
  76. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-09.xml +0 -0
  77. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-10.xml +0 -0
  78. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-11.xml +0 -0
  79. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-12.xml +0 -0
  80. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-13.xml +0 -0
  81. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-14.xml +0 -0
  82. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-15.xml +0 -0
  83. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-16.xml +0 -0
  84. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-17.xml +0 -0
  85. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-18.xml +0 -0
  86. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-19.xml +0 -0
  87. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-20.xml +0 -0
  88. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-21.xml +0 -0
  89. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-22.xml +0 -0
  90. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-23.xml +0 -0
  91. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-24.xml +0 -0
  92. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-25.xml +0 -0
  93. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-26.xml +0 -0
  94. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-27.xml +0 -0
  95. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-28.xml +0 -0
  96. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-29.xml +0 -0
  97. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-30.xml +0 -0
  98. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-31.xml +0 -0
  99. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-32.xml +0 -0
  100. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-33.xml +0 -0
  101. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-36.xml +0 -0
  102. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-37.xml +0 -0
  103. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-38.xml +0 -0
  104. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-41.xml +0 -0
  105. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-42.xml +0 -0
  106. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-43.xml +0 -0
  107. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-44.xml +0 -0
  108. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-45.xml +0 -0
  109. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-46.xml +0 -0
  110. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-47.xml +0 -0
  111. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-48.xml +0 -0
  112. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-49.xml +0 -0
  113. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-50.xml +0 -0
  114. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-51.xml +0 -0
  115. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-52.xml +0 -0
  116. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-53.xml +0 -0
  117. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-54.xml +0 -0
  118. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-55.xml +0 -0
  119. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-56.xml +0 -0
  120. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-57.xml +0 -0
  121. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-61.xml +0 -0
  122. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-62.xml +0 -0
  123. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-63.xml +0 -0
  124. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-64.xml +0 -0
  125. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-65.xml +0 -0
  126. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CL-16.xml +0 -0
  127. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CL-18.xml +0 -0
  128. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CL-24.xml +0 -0
  129. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CO-13.xml +0 -0
  130. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CO-15-2.xml +0 -0
  131. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CO-15.xml +0 -0
  132. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-CO-25.xml +0 -0
  133. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-E-01.xml +0 -0
  134. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/BR-S-09.xml +0 -0
  135. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/UBL-SR-42.xml +0 -0
  136. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/UBL-SR-43.xml +0 -0
  137. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/UBL-SR-44.xml +0 -0
  138. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/CreditNote-unit-UBL/UBL-SR-47.xml +0 -0
  139. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-01.xml +0 -0
  140. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-02.xml +0 -0
  141. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-03.xml +0 -0
  142. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-04.xml +0 -0
  143. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-05.xml +0 -0
  144. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-06.xml +0 -0
  145. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-07.xml +0 -0
  146. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-08.xml +0 -0
  147. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-09.xml +0 -0
  148. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-10.xml +0 -0
  149. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-11.xml +0 -0
  150. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-12.xml +0 -0
  151. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-13.xml +0 -0
  152. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-14.xml +0 -0
  153. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-15.xml +0 -0
  154. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-16.xml +0 -0
  155. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-17.xml +0 -0
  156. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-18.xml +0 -0
  157. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-19.xml +0 -0
  158. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-20.xml +0 -0
  159. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-21.xml +0 -0
  160. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-22.xml +0 -0
  161. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-23.xml +0 -0
  162. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-24.xml +0 -0
  163. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-25.xml +0 -0
  164. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-26.xml +0 -0
  165. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-27.xml +0 -0
  166. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-28.xml +0 -0
  167. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-29.xml +0 -0
  168. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-30.xml +0 -0
  169. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-31.xml +0 -0
  170. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-32.xml +0 -0
  171. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-33.xml +0 -0
  172. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-36.xml +0 -0
  173. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-37.xml +0 -0
  174. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-38.xml +0 -0
  175. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-41.xml +0 -0
  176. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-42.xml +0 -0
  177. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-43.xml +0 -0
  178. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-44.xml +0 -0
  179. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-45.xml +0 -0
  180. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-46.xml +0 -0
  181. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-47.xml +0 -0
  182. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-48.xml +0 -0
  183. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-49.xml +0 -0
  184. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-50.xml +0 -0
  185. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-51.xml +0 -0
  186. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-52.xml +0 -0
  187. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-53.xml +0 -0
  188. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-54.xml +0 -0
  189. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-55.xml +0 -0
  190. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-56.xml +0 -0
  191. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-57.xml +0 -0
  192. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-61.xml +0 -0
  193. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-62.xml +0 -0
  194. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-63.xml +0 -0
  195. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-64.xml +0 -0
  196. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-65.xml +0 -0
  197. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-01.xml +0 -0
  198. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-02.xml +0 -0
  199. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-03.xml +0 -0
  200. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-04.xml +0 -0
  201. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-05.xml +0 -0
  202. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-06.xml +0 -0
  203. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-07.xml +0 -0
  204. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-08.xml +0 -0
  205. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-09.xml +0 -0
  206. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-AE-10.xml +0 -0
  207. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-01.xml +0 -0
  208. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-03.xml +0 -0
  209. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-04.xml +0 -0
  210. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-05.xml +0 -0
  211. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-06.xml +0 -0
  212. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-07.xml +0 -0
  213. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-10.xml +0 -0
  214. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-11.xml +0 -0
  215. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-13.xml +0 -0
  216. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-14.xml +0 -0
  217. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-15.xml +0 -0
  218. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-16.xml +0 -0
  219. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-17.xml +0 -0
  220. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-18.xml +0 -0
  221. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-19.xml +0 -0
  222. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-20.xml +0 -0
  223. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-21.xml +0 -0
  224. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-23.xml +0 -0
  225. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CL-24.xml +0 -0
  226. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-03.xml +0 -0
  227. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-04.xml +0 -0
  228. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-09.xml +0 -0
  229. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-10.xml +0 -0
  230. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-11.xml +0 -0
  231. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-12.xml +0 -0
  232. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-13.xml +0 -0
  233. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-14.xml +0 -0
  234. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-15-2.xml +0 -0
  235. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-15.xml +0 -0
  236. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-16.xml +0 -0
  237. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-17.xml +0 -0
  238. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-18.xml +0 -0
  239. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-19.xml +0 -0
  240. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-20.xml +0 -0
  241. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-21.xml +0 -0
  242. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-22.xml +0 -0
  243. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-23.xml +0 -0
  244. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-24.xml +0 -0
  245. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-25.xml +0 -0
  246. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-CO-26.xml +0 -0
  247. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-01.xml +0 -0
  248. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-02.xml +0 -0
  249. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-03.xml +0 -0
  250. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-04.xml +0 -0
  251. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-05.xml +0 -0
  252. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-06.xml +0 -0
  253. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-07.xml +0 -0
  254. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-08.xml +0 -0
  255. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-09.xml +0 -0
  256. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-E-10.xml +0 -0
  257. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-01.xml +0 -0
  258. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-02.xml +0 -0
  259. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-03.xml +0 -0
  260. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-04.xml +0 -0
  261. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-05.xml +0 -0
  262. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-06.xml +0 -0
  263. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-07.xml +0 -0
  264. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-08.xml +0 -0
  265. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-09.xml +0 -0
  266. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-G-10.xml +0 -0
  267. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-01.xml +0 -0
  268. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-02.xml +0 -0
  269. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-03.xml +0 -0
  270. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-04.xml +0 -0
  271. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-05.xml +0 -0
  272. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-06.xml +0 -0
  273. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-07.xml +0 -0
  274. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-08.xml +0 -0
  275. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-09.xml +0 -0
  276. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-11.xml +0 -0
  277. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IC-12.xml +0 -0
  278. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-01.xml +0 -0
  279. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-02.xml +0 -0
  280. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-03.xml +0 -0
  281. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-04.xml +0 -0
  282. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-05.xml +0 -0
  283. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-06.xml +0 -0
  284. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-07.xml +0 -0
  285. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-08-1.xml +0 -0
  286. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-08-2.xml +0 -0
  287. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-08-3.xml +0 -0
  288. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-09.xml +0 -0
  289. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IG-10.xml +0 -0
  290. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-01.xml +0 -0
  291. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-02.xml +0 -0
  292. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-03.xml +0 -0
  293. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-04.xml +0 -0
  294. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-05.xml +0 -0
  295. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-06.xml +0 -0
  296. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-07.xml +0 -0
  297. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-08-1.xml +0 -0
  298. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-08-2.xml +0 -0
  299. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-08-3.xml +0 -0
  300. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-09.xml +0 -0
  301. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-IP-10.xml +0 -0
  302. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-01.xml +0 -0
  303. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-02.xml +0 -0
  304. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-03.xml +0 -0
  305. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-04.xml +0 -0
  306. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-05.xml +0 -0
  307. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-06.xml +0 -0
  308. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-07.xml +0 -0
  309. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-08.xml +0 -0
  310. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-09.xml +0 -0
  311. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-10.xml +0 -0
  312. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-11.xml +0 -0
  313. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-12.xml +0 -0
  314. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-13.xml +0 -0
  315. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-O-14.xml +0 -0
  316. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-01.xml +0 -0
  317. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-02.xml +0 -0
  318. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-03.xml +0 -0
  319. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-04.xml +0 -0
  320. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-05.xml +0 -0
  321. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-06.xml +0 -0
  322. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-07.xml +0 -0
  323. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-08-1.xml +0 -0
  324. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-08-2.xml +0 -0
  325. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-08-3.xml +0 -0
  326. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-09.xml +0 -0
  327. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-S-10.xml +0 -0
  328. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-01.xml +0 -0
  329. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-02.xml +0 -0
  330. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-03.xml +0 -0
  331. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-04.xml +0 -0
  332. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-05.xml +0 -0
  333. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-06.xml +0 -0
  334. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-07.xml +0 -0
  335. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-08.xml +0 -0
  336. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-09.xml +0 -0
  337. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/BR-Z-10.xml +0 -0
  338. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-DT-01.xml +0 -0
  339. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-DT-06.xml +0 -0
  340. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-DT-07.xml +0 -0
  341. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-SR-12.xml +0 -0
  342. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-SR-18.xml +0 -0
  343. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-SR-42.xml +0 -0
  344. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-SR-44.xml +0 -0
  345. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/en16931/unit/Invoice-unit-UBL/UBL-SR-47.xml +0 -0
  346. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/LICENSE-Apache-2.0.txt +0 -0
  347. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/README.md +0 -0
  348. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/extension/04.01a-INVOICE_ubl.xml +0 -0
  349. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/extension/04.02a-INVOICE_ubl.xml +0 -0
  350. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/extension/04.03a-INVOICE_ubl.xml +0 -0
  351. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/extension/04.04a-INVOICE_ubl.xml +0 -0
  352. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/extension/05.01a-INVOICE_ubl.xml +0 -0
  353. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.01a-INVOICE_ubl.xml +0 -0
  354. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.02a-INVOICE_ubl.xml +0 -0
  355. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.03a-INVOICE_ubl.xml +0 -0
  356. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.04a-INVOICE_ubl.xml +0 -0
  357. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.05a-INVOICE_ubl.xml +0 -0
  358. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.06a-INVOICE_ubl.xml +0 -0
  359. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.07a-INVOICE_ubl.xml +0 -0
  360. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.08a-INVOICE_ubl.xml +0 -0
  361. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.09a-INVOICE_ubl.xml +0 -0
  362. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.10a-INVOICE_ubl.xml +0 -0
  363. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.11a-INVOICE_ubl.xml +0 -0
  364. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.12a-INVOICE_ubl.xml +0 -0
  365. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.13a-INVOICE_ubl.xml +0 -0
  366. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.14a-INVOICE_ubl.xml +0 -0
  367. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.15a-INVOICE_ubl.xml +0 -0
  368. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.17a-INVOICE_ubl.xml +0 -0
  369. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.18a-INVOICE_ubl.xml +0 -0
  370. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.19a-INVOICE_ubl.xml +0 -0
  371. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.20a-INVOICE_ubl.xml +0 -0
  372. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/01.21a-INVOICE_ubl.xml +0 -0
  373. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/02.01a-INVOICE_ubl.xml +0 -0
  374. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/02.02a-INVOICE_ubl.xml +0 -0
  375. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/02.03a-INVOICE_ubl.xml +0 -0
  376. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/02.04a-INVOICE_ubl.xml +0 -0
  377. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/02.05a-INVOICE_ubl.xml +0 -0
  378. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/02.06a-INVOICE_ubl.xml +0 -0
  379. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/03.01a-INVOICE_ubl.xml +0 -0
  380. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/03.02a-INVOICE_ubl.xml +0 -0
  381. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/03.03a-INVOICE_ubl.xml +0 -0
  382. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/03.04a-INVOICE_ubl.xml +0 -0
  383. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/03.05a-INVOICE_ubl.xml +0 -0
  384. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/03.06a-INVOICE_ubl.xml +0 -0
  385. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/business-cases/standard/03.07a-INVOICE_ubl.xml +0 -0
  386. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/technical-cases/cius/01.01_comprehensive_test_ubl.xml +0 -0
  387. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/technical-cases/cius/01.02_comprehensive_test_ubl.xml +0 -0
  388. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/technical-cases/cius/01.03_comprehensive_test_ubl.xml +0 -0
  389. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/technical-cases/cius/01.04_comprehensive_test_ubl.xml +0 -0
  390. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/technical-cases/cius/01.05_minimal_test_ubl.xml +0 -0
  391. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/technical-cases/cius/01.06_minimal_test_ubl.xml +0 -0
  392. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/external/xrechnung/technical-cases/cvd/02.01a-cvd_INVOICE_ubl.xml +0 -0
  393. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/peppol-creditnote.xml +0 -0
  394. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/peppol-invoice.xml +0 -0
  395. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/peppol-response.xml +0 -0
  396. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/samples/xrechnung-invoice.xml +0 -0
  397. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_business_rules.py +0 -0
  398. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_code_rules.py +0 -0
  399. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_model.py +0 -0
  400. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_peppol_de_rules.py +0 -0
  401. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_peppol_national_rules.py +0 -0
  402. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_peppol_rules.py +0 -0
  403. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_reading.py +0 -0
  404. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_refusals.py +0 -0
  405. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_response.py +0 -0
  406. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_rules.py +0 -0
  407. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_ubl_rules.py +0 -0
  408. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_upstream.py +0 -0
  409. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_vat_rules.py +0 -0
  410. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_writing.py +0 -0
  411. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/test_xrechnung_rules.py +0 -0
  412. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tests/upstream.py +0 -0
  413. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tools/code_lists.py +0 -0
  414. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tools/fetch_peppol.py +0 -0
  415. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tools/peppol-files.tsv +0 -0
  416. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tools/peppol-response-files.tsv +0 -0
  417. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tools/published_rules.py +0 -0
  418. {mock_einvoice-0.3.0 → mock_einvoice-0.4.0}/tools/ubl_syntax.py +0 -0
@@ -10,6 +10,57 @@ says so where it does.
10
10
 
11
11
  Nothing yet.
12
12
 
13
+ ## [0.4.0] - 2026-10-22
14
+
15
+ The binding is served, and the clock can be moved. **Every stamp changes**:
16
+ it ends in `Z` now.
17
+
18
+ ### Added
19
+
20
+ - **The UBL binding over HTTP** ([#39]). `GET /_mock/binding/Invoice` and
21
+ `/_mock/binding/CreditNote` give where each business term and group is in
22
+ the document, as a tree of elements: each node its element and its term,
23
+ group or fixed value, the elements UBL requires that have no term among
24
+ them. It is made from `mockeinvoice.ubl.BINDINGS`, the reader's and
25
+ writer's own table, when asked. Where one element has several entries
26
+ (an allowance or a charge), each says the test that picks it, as words and
27
+ as data. A test reads this project's samples and fifty published documents
28
+ by the served binding alone and comes to what the reader comes to. In
29
+ Python, `ubl.described`.
30
+ - **A clock that can be moved** ([#41]). `POST /_mock/advance` takes
31
+ `seconds` or a time `to` move to, in the query string or as JSON, and what
32
+ is received or said afterwards is stamped then: the stamps, the date and
33
+ time in an Invoice Response, and the dates of an invoice the supplier
34
+ writes. It does not go backwards. In Python, `mockeinvoice.clock.Clock`,
35
+ which a `Buyer` and a `Supplier` take as their `now`.
36
+ - `GET /_mock/health` says what time it is by the clock, as `"now"`.
37
+ - `--clock` takes a time with `Z` or an offset (`2026-10-07T11:00+02:00`),
38
+ and a date alone.
39
+ - A time whose `+` offset a query string turned into a space
40
+ (`?to=2026-10-07T11:00+02:00`) is refused with a word saying a `+` is
41
+ written `%2B` there ([#44]). Only such a time: one wrong another way is
42
+ not sent looking for a `+`.
43
+
44
+ ### Changed
45
+
46
+ - The README and the package's page on PyPI point at the project's page on
47
+ rickseufert.com ([#43](https://github.com/rseufert/mock-einvoice/pull/43)).
48
+ - **A stamp says its zone.** `"received"` and `"sent"` were
49
+ `2026-10-07T09:00:00` and are `2026-10-07T09:00:00Z`. They were UTC before
50
+ and are UTC now; a client that parsed them as a time with no zone has to
51
+ take the `Z`.
52
+ - **What `--clock` means is written down, and is what it did**: the clock is
53
+ pinned to that moment, in UTC, and stands still until it is advanced. A
54
+ `now` given to a `Buyer` or a `Supplier` with a zone other than UTC is said
55
+ in UTC, where its own wall time was written before.
56
+ - `--clock` refuses what is not a time with a sentence, and no longer takes
57
+ the other forms `datetime.fromisoformat` does (a space for the `T`,
58
+ fractions of a second).
59
+ - The tests that pick an entry of the binding (`ubl.sepa`,
60
+ `ubl.in_accounting_currency`, and what `ubl.indicator` and
61
+ `ubl.document_type` return) are `ubl.When` objects, called as the
62
+ functions were. Nothing is read or written differently.
63
+
13
64
  ## [0.3.0] - 2026-10-10
14
65
 
15
66
  The supplier writes an invoice itself, and the business terms can be read
@@ -290,3 +341,6 @@ built, and was in no release.
290
341
  [#27]: https://github.com/rseufert/mock-einvoice/issues/27
291
342
  [#33]: https://github.com/rseufert/mock-einvoice/issues/33
292
343
  [#34]: https://github.com/rseufert/mock-einvoice/issues/34
344
+ [#39]: https://github.com/rseufert/mock-einvoice/issues/39
345
+ [#41]: https://github.com/rseufert/mock-einvoice/issues/41
346
+ [#44]: https://github.com/rseufert/mock-einvoice/issues/44
@@ -1,8 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mock-einvoice
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: A mock e-invoicing partner: EN 16931 invoices in and out, with the responses that follow. Zero dependencies.
5
5
  License: MIT AND EUPL-1.2
6
+ Project-URL: Homepage, https://rickseufert.com/mock-einvoice/
6
7
  Project-URL: Repository, https://github.com/rseufert/mock-einvoice
7
8
  Project-URL: Issues, https://github.com/rseufert/mock-einvoice/issues
8
9
  Project-URL: Changelog, https://github.com/rseufert/mock-einvoice/blob/main/CHANGELOG.md
@@ -34,6 +35,9 @@ A mock e-invoicing partner: EN 16931 invoices in and out, with the responses tha
34
35
 
35
36
  A sibling of [mock-sap](https://github.com/rseufert/mock-sap), [mock-edi](https://github.com/rseufert/mock-edi) and [mock-bank](https://github.com/rseufert/mock-bank), and of [mock-acme](https://github.com/rseufert/mock-acme), the integration between them.
36
37
 
38
+ By [Rick Seufert](https://rickseufert.com). Its [page](https://rickseufert.com/mock-einvoice/)
39
+ has the features and how to start it.
40
+
37
41
  ```
38
42
  python3 -m pip install mock-einvoice
39
43
  mock-einvoice --port 8100
@@ -41,11 +45,11 @@ mock-einvoice --port 8100
41
45
 
42
46
  It reads and writes UBL invoices and credit notes, and the Peppol Invoice Response that answers one, and holds them to their published rules: invoices to all 979 rules of the EN 16931 core, to all 165 of Peppol's (its own 63, the 31 it has for Germany and the 71 for seven other countries), and to the 34 of a standard XRechnung document; responses to all 82 of theirs. Over HTTP it is a buyer that takes invoices in and answers the Peppol ones, and a supplier that sends them, writes the invoice for an order it is told of, and takes the answers.
43
47
 
44
- **What 0.3.0 is not:**
48
+ **What 0.4.0 is not:**
45
49
 
46
50
  - **It writes one kind of invoice of its own, and no other.** The supplier writes the invoice for an order it is told of: every line at one standard rate of VAT, no allowances or charges, no credit note, no XRechnung ([An order, and the invoice for it](#an-order-and-the-invoice-for-it)). Anything else it sends as it is given.
47
51
  - **It takes no order off the network.** An order is this mock's own JSON on a `/_mock` path. Peppol's UBL `Order` and its rules are not built.
48
- - **It knows nothing of the other mocks.** Writing an invoice from one of mock-sap's billing documents, and saying "paid" when SAP has cleared it, is integration, and belongs in [mock-acme](https://github.com/rseufert/mock-acme) with the rest of it: its `order_to_cash`, which is on its `main` and in no release of it yet.
52
+ - **It knows nothing of the other mocks.** Writing an invoice from one of mock-sap's billing documents, and saying "paid" when SAP has cleared it, is integration, and belongs in [mock-acme](https://github.com/rseufert/mock-acme) with the rest of it: its `order_to_cash`, since mock-acme 0.6.0.
49
53
  - **Peppol's ten rules for a seller in Iceland are held to this project's tests only.** Peppol publishes unit tests for its rules for Denmark, Greece, Italy, the Netherlands, Norway and Sweden, and every case agrees here; for Iceland it publishes none. Those ten were written from the same reading of the rule file as the tests that hold them, so a misreading would be in both.
50
54
  - **No CII, no XRechnung Extension, no ZUGFeRD**, and no transport: see [What it refuses](#what-it-refuses) and [Known to be wrong, or not real](#known-to-be-wrong-or-not-real).
51
55
 
@@ -316,11 +320,13 @@ $ curl -s -X POST http://127.0.0.1:8101/_mock/orders/1/invoices
316
320
 
317
321
  | | |
318
322
  | --- | --- |
319
- | `GET /_mock/health` | that it is up, its version, and how many documents it holds and has sent |
323
+ | `GET /_mock/health` | that it is up, its version, what time it is by its clock (`"now"`), and how many documents it holds and has sent |
324
+ | `POST /_mock/advance` | move the clock forward: `?seconds=90`, or `?to=2026-10-08T08:00`, in the query string or as JSON. It answers `{"from", "to", "seconds", "pinned"}`. `400` for a time behind the clock, a fraction of a second, or more than ten years at once |
320
325
  | `GET /_mock/turned-away` | what was not taken in, on which side, and why |
321
326
  | `POST /_mock/validate` | an invoice, a credit note or an Invoice Response held to its rules, and not kept |
322
327
  | `GET /_mock/terms` | the business terms and groups this package knows, by number: `{"terms": [{"id", "name", "group", "kind"}], "groups": [{"id", "name", "repeats", "inside", "terms"}]}`, 164 terms and 32 groups, in the standard's order |
323
328
  | `GET /_mock/terms/BT-13`, `/_mock/terms/BG-25` | one term or one group, as in the list. `404` `NO-SUCH-TERM` for anything else, written any other way (`bt-13`) |
329
+ | `GET /_mock/binding/Invoice`, `/_mock/binding/CreditNote` | where each term and group is in that UBL document: the binding as a tree of elements. `GET /_mock/binding` names the two. `404` `NO-SUCH-KIND` for anything else |
324
330
  | `POST /_mock/reset` | forget every document and response, on both sides |
325
331
 
326
332
  **The terms are the package's own table, served.** `GET /_mock/terms` is made from `mockeinvoice.model.TERMS` and `GROUPS` when it is asked, so what a client reads is what the reader, the writer and the rules go by.
@@ -330,6 +336,48 @@ $ curl -s -X POST http://127.0.0.1:8101/_mock/orders/1/invoices
330
336
  - Three terms are written as an attribute of another's element (`BT-130`, the unit, is `BT-129`'s `unitCode`) and say so in `attribute_of`. Sixteen more, the scheme identifiers and their like (`BT-29-1`), have a number and no entry of their own here: each is listed under `attributes` on the term that holds it, and asked for by itself is `404` saying where it is.
331
337
  - A finding still gives a term by its number alone. Its path is not always a term (a rule about the XML gives an XPath), and a client that wants the name has this to look it up in.
332
338
 
339
+ **The binding is the reader's own table, served.** `GET /_mock/binding/Invoice` is made from `mockeinvoice.ubl.BINDINGS` when it is asked: the table the reader reads a document by and the writer writes one by. A client that walks a document beside it names every element as the reader does, and a test does just that, with `xml.etree` and the served JSON alone, over this project's samples and fifty documents from EN 16931 and XRechnung, and comes to the same terms, values and groups.
340
+
341
+ ```
342
+ {"kind": "Invoice", "element": "Invoice", "namespace": "urn:oasis:...:Invoice-2",
343
+ "prefixes": {"cbc": "urn:oasis:...", "cac": "urn:oasis:..."},
344
+ "children": [
345
+ {"element": "cbc:CustomizationID", "term": "BT-24"},
346
+ ...
347
+ {"element": "cac:AllowanceCharge", "group": "BG-20", "repeats": true,
348
+ "when": {"text": "cbc:ChargeIndicator is false or 0", "path": "cbc:ChargeIndicator", "in": ["false", "0"]},
349
+ "children": [{"element": "cbc:ChargeIndicator", "fixed": "false", "accepts": ["false", "0"]}, ...]},
350
+ ...]}
351
+ ```
352
+
353
+ A node has its `element` and what it is:
354
+
355
+ | | |
356
+ | --- | --- |
357
+ | `term` | the business term its text is the value of. `attributes` names each attribute the element may carry, and the term that attribute is (`"unitCode": "BT-130"`) or `null` where the standard has none for it (`currencyID`). `on_document` marks a term that is the document's whatever element it is in: a credit note's due date is inside `PaymentMeans`. |
358
+ | `group`, `repeats` | the business group the element is, and whether it is one of many, as `/_mock/terms` has it |
359
+ | `fixed`, `accepts` | the one value the binding gives the element (`TaxScheme/ID` is `VAT`), and what is read as that value |
360
+ | `ubl` | something UBL requires or tells things apart by, that the standard has no term or group for, under the name this package holds it by: `ubl:NetworkID` on a payment card, the scheme of a tax registration that is not VAT, the two document references known by their type code |
361
+ | `once_per` | the term the element is written once for each value of: one `PartyIdentification` to an identifier |
362
+ | `subject` | on `cbc:Note`, the term of the code written before the text between two `#` (`#AAI#the note`) |
363
+ | `children` | the elements in it, in the order the schema has them |
364
+ | *none of these* | an element that only holds others: `cac:Party`, `cac:TaxTotal` |
365
+
366
+ - **One element, several entries.** `cac:AllowanceCharge` is an allowance or a charge; `cac:AdditionalDocumentReference` is the invoiced object, a supporting document, or on a credit note the project. Such entries are in the reader's order, and each but the last has a `when`: the first whose test holds has the element, and one with no `when` takes what is left. A `when` has its `text` in words, and where it can be computed, a `path` under the element (and an `attribute` of what is there), the values it is `in`, and `ignoring_case`. An element's text is compared with the space around it taken off.
367
+ - **One test is not data.** Which of two `cac:TaxTotal` is the VAT total in the accounting currency (BT-111) depends on two currency codes at the head of the document. Those two entries have their test in words and a `name` (`tax-total-in-document-currency`, `tax-total-in-accounting-currency`), and a client has to know them by that.
368
+ - **A tax registration is served as two entries**, the VAT identifier and whatever else, told apart by `cac:TaxScheme/cbc:ID`. In the package it is one piece of code and not a row of the table, so those nodes are written out by hand beside it. A buyer and a tax representative have no term for another registration: theirs is held as the VAT identifier, and the second entry says so by naming the same term.
369
+ - **What has no node has no business term.** An element of a document that the binding has no node for is what the reader reports as `UNHELD`.
370
+ - **Not in it:** which place a value is written back to when a term has two (the creditor identifier, on the seller or the payee), and how often an element may occur.
371
+
372
+ **The clock.** Every stamp (`"received"`, `"sent"`, `"now"`), the date and time in an Invoice Response, and the dates on an invoice the supplier writes come from one clock.
373
+
374
+ - **It is UTC, and every stamp says so**: `2026-10-07T09:00:00Z`, to the second.
375
+ - **`--clock` pins it, and a pinned clock stands still.** `--clock 2026-10-07T09:00` is that moment in UTC. `--clock 2026-10-07T11:00+02:00` is the same moment, and is said back in UTC; a `Z` may be written and changes nothing. In a query string a `+` is a space, so `?to=` writes that offset `%2B02:00`; a time whose `+` became a space is refused with a word saying so, and not repaired. Every stamp and every response carries that one instant until the clock is moved, so that what a run writes does not change from run to run. It does not tick on between advances, as mock-sap's pinned clock does: a second that depends on how fast the run went is what pinning is there to take away.
376
+ - **`POST /_mock/advance` moves it**, pinned or not, by whole seconds or to a time, written as `--clock` is (a date alone is its midnight). What is received or said after that is stamped then. Without `--clock` the clock is real time plus whatever it was advanced by.
377
+ - **It does not go backwards.** A time it is already at moves it nowhere and is no error. `POST /_mock/reset` forgets the documents and leaves the clock where it is.
378
+ - **The time inside an Invoice Response has no zone written on it** (`cbc:IssueTime` is `09:00:00`). It is UTC like the rest.
379
+ - Two of the mock run as two processes have two clocks, and each is advanced by itself.
380
+
333
381
  To see the two sides talk, run two: a buyer with `--seller-url http://127.0.0.1:8101/responses`, and a supplier with `--buyer-url http://127.0.0.1:8100/invoices`.
334
382
 
335
383
  ## What it refuses
@@ -368,7 +416,7 @@ A group with nothing in it is still there: an empty `TaxSubtotal` is a VAT break
368
416
 
369
417
  - **No transport.** A real Peppol invoice goes by AS4, signed and encrypted, between access points that find each other by SMP lookup. Here it is a `POST`, and the other party is a URL. The paths and status codes are this mock's own; nothing published defines an HTTP interface for any of it.
370
418
  - **An invalid document is turned away at the door and gets no Invoice Response.** On the real network the sender's access point validates before it sends, and Peppol's guide puts the status of a transmission outside what an Invoice Response is for. That this is how a failed validation should look from the seller's side is this project's reading and not a published rule.
371
- - **Nothing happens with time.** A real buyer moves an invoice to in process, accepted and paid over days, and Peppol asks for a first response within three working days. Here each status after the first is asked for.
419
+ - **Nothing happens with time**, though the clock can be moved (`POST /_mock/advance`): moving it changes what is stamped next and nothing else. A real buyer moves an invoice to in process, accepted and paid over days, and Peppol asks for a first response within three working days. Here each status after the first is asked for.
372
420
  - **A duplicate is taken like the first.** A second document with a seller and a number already held is held too. A real buyer's system would likely reject it; with which status and reason is not known here, and is not guessed.
373
421
  - **Any buyer an invoice names is this mock**, and no document is turned away because its buyer is unknown. Nor does the supplier compare who a response is from with who its invoice was for: a response is matched by the invoice's number and type code alone, and of two documents sent with one number it is taken to be about the later.
374
422
  - **A response about a document that was never sent is turned away**, and so is one that names a type code other than its document's (`OP-BR111-R014`). The guide says the code must be the document's own and not what a seller does when it is not; and on the real network a response would be delivered whatever it was about. Both are this project's choices.
@@ -4,6 +4,9 @@ A mock e-invoicing partner: EN 16931 invoices in and out, with the responses tha
4
4
 
5
5
  A sibling of [mock-sap](https://github.com/rseufert/mock-sap), [mock-edi](https://github.com/rseufert/mock-edi) and [mock-bank](https://github.com/rseufert/mock-bank), and of [mock-acme](https://github.com/rseufert/mock-acme), the integration between them.
6
6
 
7
+ By [Rick Seufert](https://rickseufert.com). Its [page](https://rickseufert.com/mock-einvoice/)
8
+ has the features and how to start it.
9
+
7
10
  ```
8
11
  python3 -m pip install mock-einvoice
9
12
  mock-einvoice --port 8100
@@ -11,11 +14,11 @@ mock-einvoice --port 8100
11
14
 
12
15
  It reads and writes UBL invoices and credit notes, and the Peppol Invoice Response that answers one, and holds them to their published rules: invoices to all 979 rules of the EN 16931 core, to all 165 of Peppol's (its own 63, the 31 it has for Germany and the 71 for seven other countries), and to the 34 of a standard XRechnung document; responses to all 82 of theirs. Over HTTP it is a buyer that takes invoices in and answers the Peppol ones, and a supplier that sends them, writes the invoice for an order it is told of, and takes the answers.
13
16
 
14
- **What 0.3.0 is not:**
17
+ **What 0.4.0 is not:**
15
18
 
16
19
  - **It writes one kind of invoice of its own, and no other.** The supplier writes the invoice for an order it is told of: every line at one standard rate of VAT, no allowances or charges, no credit note, no XRechnung ([An order, and the invoice for it](#an-order-and-the-invoice-for-it)). Anything else it sends as it is given.
17
20
  - **It takes no order off the network.** An order is this mock's own JSON on a `/_mock` path. Peppol's UBL `Order` and its rules are not built.
18
- - **It knows nothing of the other mocks.** Writing an invoice from one of mock-sap's billing documents, and saying "paid" when SAP has cleared it, is integration, and belongs in [mock-acme](https://github.com/rseufert/mock-acme) with the rest of it: its `order_to_cash`, which is on its `main` and in no release of it yet.
21
+ - **It knows nothing of the other mocks.** Writing an invoice from one of mock-sap's billing documents, and saying "paid" when SAP has cleared it, is integration, and belongs in [mock-acme](https://github.com/rseufert/mock-acme) with the rest of it: its `order_to_cash`, since mock-acme 0.6.0.
19
22
  - **Peppol's ten rules for a seller in Iceland are held to this project's tests only.** Peppol publishes unit tests for its rules for Denmark, Greece, Italy, the Netherlands, Norway and Sweden, and every case agrees here; for Iceland it publishes none. Those ten were written from the same reading of the rule file as the tests that hold them, so a misreading would be in both.
20
23
  - **No CII, no XRechnung Extension, no ZUGFeRD**, and no transport: see [What it refuses](#what-it-refuses) and [Known to be wrong, or not real](#known-to-be-wrong-or-not-real).
21
24
 
@@ -286,11 +289,13 @@ $ curl -s -X POST http://127.0.0.1:8101/_mock/orders/1/invoices
286
289
 
287
290
  | | |
288
291
  | --- | --- |
289
- | `GET /_mock/health` | that it is up, its version, and how many documents it holds and has sent |
292
+ | `GET /_mock/health` | that it is up, its version, what time it is by its clock (`"now"`), and how many documents it holds and has sent |
293
+ | `POST /_mock/advance` | move the clock forward: `?seconds=90`, or `?to=2026-10-08T08:00`, in the query string or as JSON. It answers `{"from", "to", "seconds", "pinned"}`. `400` for a time behind the clock, a fraction of a second, or more than ten years at once |
290
294
  | `GET /_mock/turned-away` | what was not taken in, on which side, and why |
291
295
  | `POST /_mock/validate` | an invoice, a credit note or an Invoice Response held to its rules, and not kept |
292
296
  | `GET /_mock/terms` | the business terms and groups this package knows, by number: `{"terms": [{"id", "name", "group", "kind"}], "groups": [{"id", "name", "repeats", "inside", "terms"}]}`, 164 terms and 32 groups, in the standard's order |
293
297
  | `GET /_mock/terms/BT-13`, `/_mock/terms/BG-25` | one term or one group, as in the list. `404` `NO-SUCH-TERM` for anything else, written any other way (`bt-13`) |
298
+ | `GET /_mock/binding/Invoice`, `/_mock/binding/CreditNote` | where each term and group is in that UBL document: the binding as a tree of elements. `GET /_mock/binding` names the two. `404` `NO-SUCH-KIND` for anything else |
294
299
  | `POST /_mock/reset` | forget every document and response, on both sides |
295
300
 
296
301
  **The terms are the package's own table, served.** `GET /_mock/terms` is made from `mockeinvoice.model.TERMS` and `GROUPS` when it is asked, so what a client reads is what the reader, the writer and the rules go by.
@@ -300,6 +305,48 @@ $ curl -s -X POST http://127.0.0.1:8101/_mock/orders/1/invoices
300
305
  - Three terms are written as an attribute of another's element (`BT-130`, the unit, is `BT-129`'s `unitCode`) and say so in `attribute_of`. Sixteen more, the scheme identifiers and their like (`BT-29-1`), have a number and no entry of their own here: each is listed under `attributes` on the term that holds it, and asked for by itself is `404` saying where it is.
301
306
  - A finding still gives a term by its number alone. Its path is not always a term (a rule about the XML gives an XPath), and a client that wants the name has this to look it up in.
302
307
 
308
+ **The binding is the reader's own table, served.** `GET /_mock/binding/Invoice` is made from `mockeinvoice.ubl.BINDINGS` when it is asked: the table the reader reads a document by and the writer writes one by. A client that walks a document beside it names every element as the reader does, and a test does just that, with `xml.etree` and the served JSON alone, over this project's samples and fifty documents from EN 16931 and XRechnung, and comes to the same terms, values and groups.
309
+
310
+ ```
311
+ {"kind": "Invoice", "element": "Invoice", "namespace": "urn:oasis:...:Invoice-2",
312
+ "prefixes": {"cbc": "urn:oasis:...", "cac": "urn:oasis:..."},
313
+ "children": [
314
+ {"element": "cbc:CustomizationID", "term": "BT-24"},
315
+ ...
316
+ {"element": "cac:AllowanceCharge", "group": "BG-20", "repeats": true,
317
+ "when": {"text": "cbc:ChargeIndicator is false or 0", "path": "cbc:ChargeIndicator", "in": ["false", "0"]},
318
+ "children": [{"element": "cbc:ChargeIndicator", "fixed": "false", "accepts": ["false", "0"]}, ...]},
319
+ ...]}
320
+ ```
321
+
322
+ A node has its `element` and what it is:
323
+
324
+ | | |
325
+ | --- | --- |
326
+ | `term` | the business term its text is the value of. `attributes` names each attribute the element may carry, and the term that attribute is (`"unitCode": "BT-130"`) or `null` where the standard has none for it (`currencyID`). `on_document` marks a term that is the document's whatever element it is in: a credit note's due date is inside `PaymentMeans`. |
327
+ | `group`, `repeats` | the business group the element is, and whether it is one of many, as `/_mock/terms` has it |
328
+ | `fixed`, `accepts` | the one value the binding gives the element (`TaxScheme/ID` is `VAT`), and what is read as that value |
329
+ | `ubl` | something UBL requires or tells things apart by, that the standard has no term or group for, under the name this package holds it by: `ubl:NetworkID` on a payment card, the scheme of a tax registration that is not VAT, the two document references known by their type code |
330
+ | `once_per` | the term the element is written once for each value of: one `PartyIdentification` to an identifier |
331
+ | `subject` | on `cbc:Note`, the term of the code written before the text between two `#` (`#AAI#the note`) |
332
+ | `children` | the elements in it, in the order the schema has them |
333
+ | *none of these* | an element that only holds others: `cac:Party`, `cac:TaxTotal` |
334
+
335
+ - **One element, several entries.** `cac:AllowanceCharge` is an allowance or a charge; `cac:AdditionalDocumentReference` is the invoiced object, a supporting document, or on a credit note the project. Such entries are in the reader's order, and each but the last has a `when`: the first whose test holds has the element, and one with no `when` takes what is left. A `when` has its `text` in words, and where it can be computed, a `path` under the element (and an `attribute` of what is there), the values it is `in`, and `ignoring_case`. An element's text is compared with the space around it taken off.
336
+ - **One test is not data.** Which of two `cac:TaxTotal` is the VAT total in the accounting currency (BT-111) depends on two currency codes at the head of the document. Those two entries have their test in words and a `name` (`tax-total-in-document-currency`, `tax-total-in-accounting-currency`), and a client has to know them by that.
337
+ - **A tax registration is served as two entries**, the VAT identifier and whatever else, told apart by `cac:TaxScheme/cbc:ID`. In the package it is one piece of code and not a row of the table, so those nodes are written out by hand beside it. A buyer and a tax representative have no term for another registration: theirs is held as the VAT identifier, and the second entry says so by naming the same term.
338
+ - **What has no node has no business term.** An element of a document that the binding has no node for is what the reader reports as `UNHELD`.
339
+ - **Not in it:** which place a value is written back to when a term has two (the creditor identifier, on the seller or the payee), and how often an element may occur.
340
+
341
+ **The clock.** Every stamp (`"received"`, `"sent"`, `"now"`), the date and time in an Invoice Response, and the dates on an invoice the supplier writes come from one clock.
342
+
343
+ - **It is UTC, and every stamp says so**: `2026-10-07T09:00:00Z`, to the second.
344
+ - **`--clock` pins it, and a pinned clock stands still.** `--clock 2026-10-07T09:00` is that moment in UTC. `--clock 2026-10-07T11:00+02:00` is the same moment, and is said back in UTC; a `Z` may be written and changes nothing. In a query string a `+` is a space, so `?to=` writes that offset `%2B02:00`; a time whose `+` became a space is refused with a word saying so, and not repaired. Every stamp and every response carries that one instant until the clock is moved, so that what a run writes does not change from run to run. It does not tick on between advances, as mock-sap's pinned clock does: a second that depends on how fast the run went is what pinning is there to take away.
345
+ - **`POST /_mock/advance` moves it**, pinned or not, by whole seconds or to a time, written as `--clock` is (a date alone is its midnight). What is received or said after that is stamped then. Without `--clock` the clock is real time plus whatever it was advanced by.
346
+ - **It does not go backwards.** A time it is already at moves it nowhere and is no error. `POST /_mock/reset` forgets the documents and leaves the clock where it is.
347
+ - **The time inside an Invoice Response has no zone written on it** (`cbc:IssueTime` is `09:00:00`). It is UTC like the rest.
348
+ - Two of the mock run as two processes have two clocks, and each is advanced by itself.
349
+
303
350
  To see the two sides talk, run two: a buyer with `--seller-url http://127.0.0.1:8101/responses`, and a supplier with `--buyer-url http://127.0.0.1:8100/invoices`.
304
351
 
305
352
  ## What it refuses
@@ -338,7 +385,7 @@ A group with nothing in it is still there: an empty `TaxSubtotal` is a VAT break
338
385
 
339
386
  - **No transport.** A real Peppol invoice goes by AS4, signed and encrypted, between access points that find each other by SMP lookup. Here it is a `POST`, and the other party is a URL. The paths and status codes are this mock's own; nothing published defines an HTTP interface for any of it.
340
387
  - **An invalid document is turned away at the door and gets no Invoice Response.** On the real network the sender's access point validates before it sends, and Peppol's guide puts the status of a transmission outside what an Invoice Response is for. That this is how a failed validation should look from the seller's side is this project's reading and not a published rule.
341
- - **Nothing happens with time.** A real buyer moves an invoice to in process, accepted and paid over days, and Peppol asks for a first response within three working days. Here each status after the first is asked for.
388
+ - **Nothing happens with time**, though the clock can be moved (`POST /_mock/advance`): moving it changes what is stamped next and nothing else. A real buyer moves an invoice to in process, accepted and paid over days, and Peppol asks for a first response within three working days. Here each status after the first is asked for.
342
389
  - **A duplicate is taken like the first.** A second document with a seller and a number already held is held too. A real buyer's system would likely reject it; with which status and reason is not known here, and is not guessed.
343
390
  - **Any buyer an invoice names is this mock**, and no document is turned away because its buyer is unknown. Nor does the supplier compare who a response is from with who its invoice was for: a response is matched by the invoice's number and type code alone, and of two documents sent with one number it is taken to be about the later.
344
391
  - **A response about a document that was never sent is turned away**, and so is one that names a type code other than its document's (`OP-BR111-R014`). The guide says the code must be the document's own and not what a seller does when it is not; and on the real network a response would be delivered whatever it was about. Both are this project's choices.
@@ -1,8 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mock-einvoice
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: A mock e-invoicing partner: EN 16931 invoices in and out, with the responses that follow. Zero dependencies.
5
5
  License: MIT AND EUPL-1.2
6
+ Project-URL: Homepage, https://rickseufert.com/mock-einvoice/
6
7
  Project-URL: Repository, https://github.com/rseufert/mock-einvoice
7
8
  Project-URL: Issues, https://github.com/rseufert/mock-einvoice/issues
8
9
  Project-URL: Changelog, https://github.com/rseufert/mock-einvoice/blob/main/CHANGELOG.md
@@ -34,6 +35,9 @@ A mock e-invoicing partner: EN 16931 invoices in and out, with the responses tha
34
35
 
35
36
  A sibling of [mock-sap](https://github.com/rseufert/mock-sap), [mock-edi](https://github.com/rseufert/mock-edi) and [mock-bank](https://github.com/rseufert/mock-bank), and of [mock-acme](https://github.com/rseufert/mock-acme), the integration between them.
36
37
 
38
+ By [Rick Seufert](https://rickseufert.com). Its [page](https://rickseufert.com/mock-einvoice/)
39
+ has the features and how to start it.
40
+
37
41
  ```
38
42
  python3 -m pip install mock-einvoice
39
43
  mock-einvoice --port 8100
@@ -41,11 +45,11 @@ mock-einvoice --port 8100
41
45
 
42
46
  It reads and writes UBL invoices and credit notes, and the Peppol Invoice Response that answers one, and holds them to their published rules: invoices to all 979 rules of the EN 16931 core, to all 165 of Peppol's (its own 63, the 31 it has for Germany and the 71 for seven other countries), and to the 34 of a standard XRechnung document; responses to all 82 of theirs. Over HTTP it is a buyer that takes invoices in and answers the Peppol ones, and a supplier that sends them, writes the invoice for an order it is told of, and takes the answers.
43
47
 
44
- **What 0.3.0 is not:**
48
+ **What 0.4.0 is not:**
45
49
 
46
50
  - **It writes one kind of invoice of its own, and no other.** The supplier writes the invoice for an order it is told of: every line at one standard rate of VAT, no allowances or charges, no credit note, no XRechnung ([An order, and the invoice for it](#an-order-and-the-invoice-for-it)). Anything else it sends as it is given.
47
51
  - **It takes no order off the network.** An order is this mock's own JSON on a `/_mock` path. Peppol's UBL `Order` and its rules are not built.
48
- - **It knows nothing of the other mocks.** Writing an invoice from one of mock-sap's billing documents, and saying "paid" when SAP has cleared it, is integration, and belongs in [mock-acme](https://github.com/rseufert/mock-acme) with the rest of it: its `order_to_cash`, which is on its `main` and in no release of it yet.
52
+ - **It knows nothing of the other mocks.** Writing an invoice from one of mock-sap's billing documents, and saying "paid" when SAP has cleared it, is integration, and belongs in [mock-acme](https://github.com/rseufert/mock-acme) with the rest of it: its `order_to_cash`, since mock-acme 0.6.0.
49
53
  - **Peppol's ten rules for a seller in Iceland are held to this project's tests only.** Peppol publishes unit tests for its rules for Denmark, Greece, Italy, the Netherlands, Norway and Sweden, and every case agrees here; for Iceland it publishes none. Those ten were written from the same reading of the rule file as the tests that hold them, so a misreading would be in both.
50
54
  - **No CII, no XRechnung Extension, no ZUGFeRD**, and no transport: see [What it refuses](#what-it-refuses) and [Known to be wrong, or not real](#known-to-be-wrong-or-not-real).
51
55
 
@@ -316,11 +320,13 @@ $ curl -s -X POST http://127.0.0.1:8101/_mock/orders/1/invoices
316
320
 
317
321
  | | |
318
322
  | --- | --- |
319
- | `GET /_mock/health` | that it is up, its version, and how many documents it holds and has sent |
323
+ | `GET /_mock/health` | that it is up, its version, what time it is by its clock (`"now"`), and how many documents it holds and has sent |
324
+ | `POST /_mock/advance` | move the clock forward: `?seconds=90`, or `?to=2026-10-08T08:00`, in the query string or as JSON. It answers `{"from", "to", "seconds", "pinned"}`. `400` for a time behind the clock, a fraction of a second, or more than ten years at once |
320
325
  | `GET /_mock/turned-away` | what was not taken in, on which side, and why |
321
326
  | `POST /_mock/validate` | an invoice, a credit note or an Invoice Response held to its rules, and not kept |
322
327
  | `GET /_mock/terms` | the business terms and groups this package knows, by number: `{"terms": [{"id", "name", "group", "kind"}], "groups": [{"id", "name", "repeats", "inside", "terms"}]}`, 164 terms and 32 groups, in the standard's order |
323
328
  | `GET /_mock/terms/BT-13`, `/_mock/terms/BG-25` | one term or one group, as in the list. `404` `NO-SUCH-TERM` for anything else, written any other way (`bt-13`) |
329
+ | `GET /_mock/binding/Invoice`, `/_mock/binding/CreditNote` | where each term and group is in that UBL document: the binding as a tree of elements. `GET /_mock/binding` names the two. `404` `NO-SUCH-KIND` for anything else |
324
330
  | `POST /_mock/reset` | forget every document and response, on both sides |
325
331
 
326
332
  **The terms are the package's own table, served.** `GET /_mock/terms` is made from `mockeinvoice.model.TERMS` and `GROUPS` when it is asked, so what a client reads is what the reader, the writer and the rules go by.
@@ -330,6 +336,48 @@ $ curl -s -X POST http://127.0.0.1:8101/_mock/orders/1/invoices
330
336
  - Three terms are written as an attribute of another's element (`BT-130`, the unit, is `BT-129`'s `unitCode`) and say so in `attribute_of`. Sixteen more, the scheme identifiers and their like (`BT-29-1`), have a number and no entry of their own here: each is listed under `attributes` on the term that holds it, and asked for by itself is `404` saying where it is.
331
337
  - A finding still gives a term by its number alone. Its path is not always a term (a rule about the XML gives an XPath), and a client that wants the name has this to look it up in.
332
338
 
339
+ **The binding is the reader's own table, served.** `GET /_mock/binding/Invoice` is made from `mockeinvoice.ubl.BINDINGS` when it is asked: the table the reader reads a document by and the writer writes one by. A client that walks a document beside it names every element as the reader does, and a test does just that, with `xml.etree` and the served JSON alone, over this project's samples and fifty documents from EN 16931 and XRechnung, and comes to the same terms, values and groups.
340
+
341
+ ```
342
+ {"kind": "Invoice", "element": "Invoice", "namespace": "urn:oasis:...:Invoice-2",
343
+ "prefixes": {"cbc": "urn:oasis:...", "cac": "urn:oasis:..."},
344
+ "children": [
345
+ {"element": "cbc:CustomizationID", "term": "BT-24"},
346
+ ...
347
+ {"element": "cac:AllowanceCharge", "group": "BG-20", "repeats": true,
348
+ "when": {"text": "cbc:ChargeIndicator is false or 0", "path": "cbc:ChargeIndicator", "in": ["false", "0"]},
349
+ "children": [{"element": "cbc:ChargeIndicator", "fixed": "false", "accepts": ["false", "0"]}, ...]},
350
+ ...]}
351
+ ```
352
+
353
+ A node has its `element` and what it is:
354
+
355
+ | | |
356
+ | --- | --- |
357
+ | `term` | the business term its text is the value of. `attributes` names each attribute the element may carry, and the term that attribute is (`"unitCode": "BT-130"`) or `null` where the standard has none for it (`currencyID`). `on_document` marks a term that is the document's whatever element it is in: a credit note's due date is inside `PaymentMeans`. |
358
+ | `group`, `repeats` | the business group the element is, and whether it is one of many, as `/_mock/terms` has it |
359
+ | `fixed`, `accepts` | the one value the binding gives the element (`TaxScheme/ID` is `VAT`), and what is read as that value |
360
+ | `ubl` | something UBL requires or tells things apart by, that the standard has no term or group for, under the name this package holds it by: `ubl:NetworkID` on a payment card, the scheme of a tax registration that is not VAT, the two document references known by their type code |
361
+ | `once_per` | the term the element is written once for each value of: one `PartyIdentification` to an identifier |
362
+ | `subject` | on `cbc:Note`, the term of the code written before the text between two `#` (`#AAI#the note`) |
363
+ | `children` | the elements in it, in the order the schema has them |
364
+ | *none of these* | an element that only holds others: `cac:Party`, `cac:TaxTotal` |
365
+
366
+ - **One element, several entries.** `cac:AllowanceCharge` is an allowance or a charge; `cac:AdditionalDocumentReference` is the invoiced object, a supporting document, or on a credit note the project. Such entries are in the reader's order, and each but the last has a `when`: the first whose test holds has the element, and one with no `when` takes what is left. A `when` has its `text` in words, and where it can be computed, a `path` under the element (and an `attribute` of what is there), the values it is `in`, and `ignoring_case`. An element's text is compared with the space around it taken off.
367
+ - **One test is not data.** Which of two `cac:TaxTotal` is the VAT total in the accounting currency (BT-111) depends on two currency codes at the head of the document. Those two entries have their test in words and a `name` (`tax-total-in-document-currency`, `tax-total-in-accounting-currency`), and a client has to know them by that.
368
+ - **A tax registration is served as two entries**, the VAT identifier and whatever else, told apart by `cac:TaxScheme/cbc:ID`. In the package it is one piece of code and not a row of the table, so those nodes are written out by hand beside it. A buyer and a tax representative have no term for another registration: theirs is held as the VAT identifier, and the second entry says so by naming the same term.
369
+ - **What has no node has no business term.** An element of a document that the binding has no node for is what the reader reports as `UNHELD`.
370
+ - **Not in it:** which place a value is written back to when a term has two (the creditor identifier, on the seller or the payee), and how often an element may occur.
371
+
372
+ **The clock.** Every stamp (`"received"`, `"sent"`, `"now"`), the date and time in an Invoice Response, and the dates on an invoice the supplier writes come from one clock.
373
+
374
+ - **It is UTC, and every stamp says so**: `2026-10-07T09:00:00Z`, to the second.
375
+ - **`--clock` pins it, and a pinned clock stands still.** `--clock 2026-10-07T09:00` is that moment in UTC. `--clock 2026-10-07T11:00+02:00` is the same moment, and is said back in UTC; a `Z` may be written and changes nothing. In a query string a `+` is a space, so `?to=` writes that offset `%2B02:00`; a time whose `+` became a space is refused with a word saying so, and not repaired. Every stamp and every response carries that one instant until the clock is moved, so that what a run writes does not change from run to run. It does not tick on between advances, as mock-sap's pinned clock does: a second that depends on how fast the run went is what pinning is there to take away.
376
+ - **`POST /_mock/advance` moves it**, pinned or not, by whole seconds or to a time, written as `--clock` is (a date alone is its midnight). What is received or said after that is stamped then. Without `--clock` the clock is real time plus whatever it was advanced by.
377
+ - **It does not go backwards.** A time it is already at moves it nowhere and is no error. `POST /_mock/reset` forgets the documents and leaves the clock where it is.
378
+ - **The time inside an Invoice Response has no zone written on it** (`cbc:IssueTime` is `09:00:00`). It is UTC like the rest.
379
+ - Two of the mock run as two processes have two clocks, and each is advanced by itself.
380
+
333
381
  To see the two sides talk, run two: a buyer with `--seller-url http://127.0.0.1:8101/responses`, and a supplier with `--buyer-url http://127.0.0.1:8100/invoices`.
334
382
 
335
383
  ## What it refuses
@@ -368,7 +416,7 @@ A group with nothing in it is still there: an empty `TaxSubtotal` is a VAT break
368
416
 
369
417
  - **No transport.** A real Peppol invoice goes by AS4, signed and encrypted, between access points that find each other by SMP lookup. Here it is a `POST`, and the other party is a URL. The paths and status codes are this mock's own; nothing published defines an HTTP interface for any of it.
370
418
  - **An invalid document is turned away at the door and gets no Invoice Response.** On the real network the sender's access point validates before it sends, and Peppol's guide puts the status of a transmission outside what an Invoice Response is for. That this is how a failed validation should look from the seller's side is this project's reading and not a published rule.
371
- - **Nothing happens with time.** A real buyer moves an invoice to in process, accepted and paid over days, and Peppol asks for a first response within three working days. Here each status after the first is asked for.
419
+ - **Nothing happens with time**, though the clock can be moved (`POST /_mock/advance`): moving it changes what is stamped next and nothing else. A real buyer moves an invoice to in process, accepted and paid over days, and Peppol asks for a first response within three working days. Here each status after the first is asked for.
372
420
  - **A duplicate is taken like the first.** A second document with a seller and a number already held is held too. A real buyer's system would likely reject it; with which status and reason is not known here, and is not guessed.
373
421
  - **Any buyer an invoice names is this mock**, and no document is turned away because its buyer is unknown. Nor does the supplier compare who a response is from with who its invoice was for: a response is matched by the invoice's number and type code alone, and of two documents sent with one number it is taken to be about the later.
374
422
  - **A response about a document that was never sent is turned away**, and so is one that names a type code other than its document's (`OP-BR111-R014`). The guide says the code must be the document's own and not what a seller does when it is not; and on the real network a response would be delivered whatever it was about. Both are this project's choices.
@@ -11,6 +11,7 @@ mock_einvoice.egg-info/top_level.txt
11
11
  mockeinvoice/__init__.py
12
12
  mockeinvoice/__main__.py
13
13
  mockeinvoice/buyer.py
14
+ mockeinvoice/clock.py
14
15
  mockeinvoice/model.py
15
16
  mockeinvoice/order.py
16
17
  mockeinvoice/response.py
@@ -37,8 +38,10 @@ mockeinvoice/rules/ublsyntax.py
37
38
  mockeinvoice/rules/untdid.py
38
39
  mockeinvoice/rules/xrechnung.py
39
40
  tests/__init__.py
41
+ tests/test_binding.py
40
42
  tests/test_business_rules.py
41
43
  tests/test_buyer.py
44
+ tests/test_clock.py
42
45
  tests/test_code_rules.py
43
46
  tests/test_model.py
44
47
  tests/test_order.py
@@ -37,7 +37,7 @@ from .response import Response
37
37
  from .rules import Report, check, check_response
38
38
  from .ubl import parse, parse_tree, write
39
39
 
40
- __version__ = "0.3.0"
40
+ __version__ = "0.4.0"
41
41
 
42
42
  __all__ = ["Document", "Finding", "Group", "Refused", "Report", "Response", "Value", "check",
43
43
  "read", "read_response", "validate", "validate_response", "write", "write_response",
@@ -28,6 +28,7 @@ import threading
28
28
  from dataclasses import dataclass, field
29
29
  from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union
30
30
 
31
+ from . import clock as _clock
31
32
  from . import response as _response
32
33
  from . import specification as _specification
33
34
  from .model import Document, Finding, Refused
@@ -166,7 +167,8 @@ class Buyer:
166
167
 
167
168
  `deliver` is called with each response's XML and returns what became of
168
169
  sending it (see `Sent.delivery`); without one, responses are kept and not
169
- sent. `now` is the clock.
170
+ sent. `now` is the clock: a `clock.Clock`, or anything that when called
171
+ gives the time (one with no zone is taken to be UTC).
170
172
  """
171
173
 
172
174
  def __init__(self, answers: str = "required",
@@ -188,7 +190,7 @@ class Buyer:
188
190
  self.turned_away: List[Tuple[str, str, str]] = []
189
191
 
190
192
  def stamp(self) -> str:
191
- return self.now().replace(microsecond=0, tzinfo=None).isoformat()
193
+ return _clock.stamp(self.now())
192
194
 
193
195
  # -- taking a document in -----------------------------------------------------------
194
196
 
@@ -279,7 +281,7 @@ class Buyer:
279
281
  note: str) -> Response:
280
282
  """The response to one document: from its buyer to its seller, about
281
283
  it by number, date and type, under the profile its own calls for."""
282
- document, now = held.document, self.now()
284
+ document, now = held.document, _clock.utc(self.now())
283
285
  return Response(
284
286
  profile=(_response.BILLING_WITH_RESPONSE if held.profile == "02"
285
287
  else _response.PROFILE),
@@ -0,0 +1,128 @@
1
+ """The mock's clock: one that can be pinned, and moved forward.
2
+
3
+ from mockeinvoice.clock import Clock
4
+
5
+ clock = Clock("2026-10-07T09:00") # pinned; or Clock() for real time
6
+ clock.now() # an aware datetime, in UTC
7
+ clock.advance(seconds=90) # or to="2026-10-08T08:00"
8
+ clock.stamp() # "2026-10-07T09:01:30Z"
9
+
10
+ **A pinned clock stands still.** It is at the moment it was pinned to until it
11
+ is advanced, and then at that moment, so that what a run writes does not
12
+ change from run to run: two responses given without an advance between them
13
+ carry the same second. mock-sap's pinned clock ticks on from where it was
14
+ pinned; this one does not, because a second that depends on how fast the run
15
+ went is what pinning is there to take away.
16
+
17
+ **A clock that is not pinned is real time, plus whatever it was advanced by.**
18
+
19
+ **It is UTC, and only UTC.** A time given with no zone is taken to be UTC; one
20
+ given with an offset is that moment, and is said back in UTC. Every stamp ends
21
+ in `Z`. Nothing here depends on a zone: there is no cutoff hour and no
22
+ business day.
23
+
24
+ **It does not go backwards**, because what was stamped since would then be in
25
+ the future, and one advance moves it at most about ten years.
26
+ """
27
+ from __future__ import annotations
28
+
29
+ import datetime
30
+ import re
31
+ import threading
32
+ from typing import Callable, Dict, Optional, Union
33
+
34
+ UTC = datetime.timezone.utc
35
+ MOST = 3650 * 86400 # seconds, the furthest one advance moves
36
+ MOMENT = re.compile(r"\d{4}-\d{2}-\d{2}"
37
+ r"(T([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?(Z|[+-]([01]\d|2[0-3]):[0-5]\d)?)?")
38
+
39
+
40
+ class Invalid(ValueError):
41
+ """A time the clock was not given in a way it takes, or cannot move to."""
42
+
43
+
44
+ def utc(moment: datetime.datetime) -> datetime.datetime:
45
+ """A moment in UTC. One with no zone is taken to be UTC already."""
46
+ if moment.tzinfo is None:
47
+ return moment.replace(tzinfo=UTC)
48
+ return moment.astimezone(UTC)
49
+
50
+
51
+ def stamp(moment: datetime.datetime) -> str:
52
+ """A moment as the mock writes one: to the second, in UTC, with a `Z`."""
53
+ return utc(moment).replace(microsecond=0, tzinfo=None).isoformat() + "Z"
54
+
55
+
56
+ def plus_lost(text: object) -> str:
57
+ """What to add to a refusal of a time whose `+` offset a query string
58
+ turned into a space, and "" for a time wrong any other way. Not repaired:
59
+ a URL only this mock took would break wherever else a script sent it."""
60
+ if isinstance(text, str) and MOMENT.fullmatch(text.replace(" ", "+")):
61
+ return ": a + in a query string is read as a space, so a + offset is written %2B there"
62
+ return ""
63
+
64
+
65
+ def moment(text: str) -> datetime.datetime:
66
+ """A moment from `2026-10-07`, `2026-10-07T09:00` or `2026-10-07T09:00:30`,
67
+ with `Z` or an offset (`+02:00`) after a time, or `Invalid`. With no zone
68
+ it is UTC; a date alone is its midnight."""
69
+ if not isinstance(text, str) or not MOMENT.fullmatch(text):
70
+ raise Invalid("a time is written 2026-10-07, 2026-10-07T09:00 or "
71
+ "2026-10-07T09:00:30, in UTC or with Z or an offset such as +02:00 "
72
+ "after it, and not %r%s" % (text, plus_lost(text)))
73
+ try:
74
+ return utc(datetime.datetime.fromisoformat(text[:-1] if text.endswith("Z") else text))
75
+ except (ValueError, OverflowError):
76
+ raise Invalid("%s is no date and time there is" % text) from None
77
+
78
+
79
+ class Clock:
80
+ """The time the mock goes by. Called, it is `now()`, so it can be given
81
+ wherever a `now` is taken."""
82
+
83
+ def __init__(self, pinned: Union[None, str, datetime.datetime] = None,
84
+ real: Optional[Callable[[], datetime.datetime]] = None):
85
+ if isinstance(pinned, str):
86
+ pinned = moment(pinned)
87
+ self.pinned = utc(pinned) if pinned is not None else None
88
+ self.real = real or (lambda: datetime.datetime.now(UTC))
89
+ self.moved = datetime.timedelta(0)
90
+ self.lock = threading.Lock()
91
+
92
+ def now(self) -> datetime.datetime:
93
+ return (self.pinned if self.pinned is not None else utc(self.real())) + self.moved
94
+
95
+ __call__ = now
96
+
97
+ def stamp(self) -> str:
98
+ return stamp(self.now())
99
+
100
+ def advance(self, seconds: object = None, to: object = None) -> Dict[str, object]:
101
+ """Move the clock forward by a whole number of seconds, or to a time
102
+ (`moment`), and say where it went, or raise `Invalid`. A time it is
103
+ already at moves it nowhere and is no error."""
104
+ if (seconds is None) == (to is None):
105
+ raise Invalid("advance takes seconds, or a time to move to, and one of them")
106
+ with self.lock:
107
+ before = self.now()
108
+ if seconds is not None:
109
+ if isinstance(seconds, str) and seconds.isdigit() and seconds.isascii():
110
+ seconds = int(seconds)
111
+ if isinstance(seconds, bool) or not isinstance(seconds, int) or seconds < 0:
112
+ raise Invalid("seconds is a whole number, nought or more, and not %r: "
113
+ "a stamp is to the second" % (seconds,))
114
+ by = seconds
115
+ else:
116
+ target = moment(to) if not isinstance(to, datetime.datetime) else utc(to)
117
+ # To the second, as a stamp is: a time the clock is at within
118
+ # the second is not behind it.
119
+ by = int((target - before.replace(microsecond=0)).total_seconds())
120
+ if by < 0:
121
+ raise Invalid("the clock does not go backwards: it is %s, and %s is "
122
+ "before that" % (stamp(before), stamp(target)))
123
+ if by > MOST:
124
+ raise Invalid("an advance moves the clock at most %d seconds (%d days), "
125
+ "and this is %d" % (MOST, MOST // 86400, by))
126
+ self.moved += datetime.timedelta(seconds=by)
127
+ return {"from": stamp(before), "to": self.stamp(), "seconds": by,
128
+ "pinned": self.pinned is not None}