mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Provider Statistics added.
Rates command added with a test. Updated to include added migration.
This commit is contained in:
14
tests/app/dao/test_provider_rates_dao.py
Normal file
14
tests/app/dao/test_provider_rates_dao.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user