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

fix test and code #33

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions calcrule_third_party_payment/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import datetime
import decimal

from claim.services import submit_claim, validate_and_process_dedrem_claim
from claim.services import ClaimSubmitService, processing_claim
from claim.models import (
ClaimDedRem,
Claim
Expand Down Expand Up @@ -77,6 +77,7 @@ def setUp(self) -> None:
user, user_created = create_or_update_core_user(
user_uuid=None, username=_TEST_DATA_USER["username"], i_user=i_user)
self.user = user
self.submit_service = ClaimSubmitService(self.user)

def test_simple_batch(self):
"""
Expand Down Expand Up @@ -179,8 +180,8 @@ def test_simple_batch(self):
class DummyUser:
def __init__(self):
self.id_for_audit = 1
errors = submit_claim(claim1,DummyUser() )
errors += validate_and_process_dedrem_claim(claim1, DummyUser(), True)
submitted_claim, errors = self.submit_service.submit_claim(claim1,DummyUser() )
errors += processing_claim(claim1, DummyUser(), True)
claim1.process_stamp = claim1.validity_from
claim1.save()
self.assertEqual(len(errors), 0)
Expand Down
Loading