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

remove amount validation #423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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: 0 additions & 7 deletions speid/tasks/orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from speid.types import Estado, EventType
from speid.validations import factory

MAX_AMOUNT = int(os.getenv('MAX_AMOUNT', '9999999999999999'))
IGNORED_EXCEPTIONS = os.getenv('IGNORED_EXCEPTIONS', '').split(',')
START_DOWNTIME = datetime.strptime(
os.getenv('START_DOWNTIME', '11:55PM'), "%I:%M%p"
Expand Down Expand Up @@ -118,12 +117,6 @@ def execute(order_val: dict):
transaction.update_stp_status()
return

# A partir de aquí son validaciones para transferencias nuevas
if transaction.monto > MAX_AMOUNT:
transaction.events.append(Event(type=EventType.error))
transaction.save()
raise MalformedOrderException()

try:
transaction.create_order()
except (
Expand Down
6 changes: 0 additions & 6 deletions tests/tasks/test_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,6 @@ def test_doesnt_retry_on_manual_review_exception(
mock_capture_exception.assert_called_once()


def test_hold_max_amount(order):
order['monto'] = 102000000
with pytest.raises(MalformedOrderException):
execute(order)


@patch('speid.tasks.orders.capture_exception')
@patch('speid.tasks.orders.send_order.retry')
def test_stp_schedule_limit(
Expand Down
Loading