mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
Use real letter_rates in tests
Added the letter_rate table to the list of tables which does not get deleted after each test run and changed the tests to use the real letter rates. Also removed the letter rate DAO since this was only being used in tests, so was no longer needed.
This commit is contained in:
@@ -32,7 +32,6 @@ from app.models import (
|
||||
SMS_TYPE,
|
||||
KEY_TYPE_NORMAL,
|
||||
AnnualBilling,
|
||||
LetterRate,
|
||||
InvitedOrganisationUser,
|
||||
FactBilling,
|
||||
FactNotificationStatus,
|
||||
@@ -475,28 +474,6 @@ def create_annual_billing(
|
||||
return annual_billing
|
||||
|
||||
|
||||
def create_letter_rate(
|
||||
start_date=datetime(2017, 1, 1, 00, 00, 00),
|
||||
end_date=None,
|
||||
sheet_count=1,
|
||||
rate=0.31,
|
||||
crown=True,
|
||||
post_class='second'
|
||||
):
|
||||
rate = LetterRate(
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
sheet_count=sheet_count,
|
||||
rate=rate,
|
||||
crown=crown,
|
||||
post_class=post_class
|
||||
)
|
||||
db.session.add(rate)
|
||||
db.session.commit()
|
||||
|
||||
return rate
|
||||
|
||||
|
||||
def create_organisation(name='test_org_1', active=True):
|
||||
data = {
|
||||
'name': name,
|
||||
|
||||
Reference in New Issue
Block a user