mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 00:41:35 -05:00
15 lines
572 B
Python
15 lines
572 B
Python
|
|
from datetime import datetime
|
||
|
|
from decimal import Decimal
|
||
|
|
from app.dao.provider_rates_dao import create_provider_rates
|
||
|
|
from app.models import ProviderRates
|
||
|
|
|
||
|
|
|
||
|
|
def test_create_provider_rates(notify_db, notify_db_session, mmg_provider_name):
|
||
|
|
now = datetime.now()
|
||
|
|
rate = Decimal("1.00000")
|
||
|
|
create_provider_rates(mmg_provider_name, now, rate)
|
||
|
|
assert ProviderRates.query.count() == 1
|
||
|
|
assert ProviderRates.query.first().rate == rate
|
||
|
|
assert ProviderRates.query.first().valid_from == now
|
||
|
|
assert ProviderRates.query.first().provider == mmg_provider_name
|