Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Test Coverage with Pytest #165

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ABHISHEKSONI121
Copy link
Collaborator

@ABHISHEKSONI121 ABHISHEKSONI121 commented Jul 14, 2024

Enhanced Test Coverage and Added New Test Suites

This PR significantly improves the test coverage of the pyafipws project by enhancing existing test suites and adding new ones.

Enhancements to Existing Test Suites

1. test_pyemail.py

  • Expanded test cases for email functionality
  • Improved assertions and edge case handling
  • Coverage increased from 76% to 89%

2. test_pyi25.py

  • Added more comprehensive tests for I25 barcode generation
  • Increased coverage of various input scenarios
  • Coverage improved from 82% to 86%

3. test_ws_sr_padron.py

  • Enhanced tests for web service interactions with AFIP's taxpayer registry
  • Improved mocking and response handling
  • Coverage boosted from 69% to 80%

4. test_wsaa.py

  • Strengthened authentication and authorization testing
  • Added more scenarios for token generation and validation
  • Coverage enhanced from 66% to 77%

New Test Suites

5. test_cot.py

  • Implemented a new test suite for COT (Código de Operación de Traslado) functionality
  • Covers various aspects of COT generation and validation
  • Achieved initial coverage of 74%

6. test_recex1.py

  • Created a new test suite for RECEX (Remito Electrónico Cárnico) functionality
  • Includes tests for document generation, validation, and processing
  • Established initial coverage of 82%

Test Coverage Improvements

Test Module Original Coverage New Coverage Improvement
test_pyemail.py 76% 89% +13%
test_pyi25.py 82% 86% +4%
test_ws_sr_padron.py 69% 80% +11%
test_wsaa.py 66% 77% +11%
test_cot.py N/A (New) 74% +74%
test_recex1.py N/A (New) 82% +82%

Test Suite Outputs

test_pyemail.py test_pyi25.py
test_ws_sr_padron.py test_wsaa.py
test_cot.py test_recex1.py

Signed-off-by: SONIABHISHEK121 <as630@snu.edu.in>
Signed-off-by: SONIABHISHEK121 <as630@snu.edu.in>
Signed-off-by: SONIABHISHEK121 <as630@snu.edu.in>
Signed-off-by: SONIABHISHEK121 <as630@snu.edu.in>
Signed-off-by: SONIABHISHEK121 <as630@snu.edu.in>
Signed-off-by: SONIABHISHEK121 <as630@snu.edu.in>
@ABHISHEKSONI121 ABHISHEKSONI121 force-pushed the enhance-test-coverage branch from 3fefb06 to b6da2b6 Compare July 17, 2024 08:00
Signed-off-by: SONIABHISHEK121 <as630@snu.edu.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant