remove provider_rates table

this was added five years ago but never used. if we want to bring back
variable rates per client we might as well get a fresh start since a lot
has changed since then.
This commit is contained in:
Leo Hemsted
2022-05-03 14:42:59 +01:00
parent 43206b1656
commit 51646af92e
7 changed files with 32 additions and 60 deletions

View File

@@ -1,18 +0,0 @@
from datetime import datetime
from decimal import Decimal
from app.dao.provider_rates_dao import create_provider_rates
from app.models import ProviderDetails, ProviderRates
def test_create_provider_rates(notify_db, notify_db_session, mmg_provider):
now = datetime.now()
rate = Decimal("1.00000")
provider = ProviderDetails.query.filter_by(identifier=mmg_provider.identifier).one()
create_provider_rates(mmg_provider.identifier, 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_id == provider.id