mirror of
https://github.com/GSA/notifications-api.git
synced 2026-06-20 05:00:42 -04:00
fix tests
This commit is contained in:
@@ -1297,7 +1297,6 @@ class ProviderDetails(db.Model):
|
||||
id = db.Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
display_name = db.Column(db.String, nullable=False)
|
||||
identifier = db.Column(db.String, nullable=False)
|
||||
priority = db.Column(db.Integer, nullable=False)
|
||||
notification_type = enum_column(NotificationType, nullable=False)
|
||||
active = db.Column(db.Boolean, default=False, nullable=False)
|
||||
version = db.Column(db.Integer, default=1, nullable=False)
|
||||
@@ -1322,7 +1321,6 @@ class ProviderDetailsHistory(db.Model, HistoryModel):
|
||||
id = db.Column(UUID(as_uuid=True), primary_key=True, nullable=False)
|
||||
display_name = db.Column(db.String, nullable=False)
|
||||
identifier = db.Column(db.String, nullable=False)
|
||||
priority = db.Column(db.Integer, nullable=False)
|
||||
notification_type = enum_column(NotificationType, nullable=False)
|
||||
active = db.Column(db.Boolean, nullable=False)
|
||||
version = db.Column(db.Integer, primary_key=True, nullable=False)
|
||||
|
||||
@@ -14,11 +14,11 @@ down_revision = "0411_add_login_uuid"
|
||||
|
||||
def upgrade():
|
||||
print("DELETING COLUMNS")
|
||||
op.drop_column("provider_details", sa.Column("priority"))
|
||||
op.drop_column("provider_details_history", sa.Column("priority"))
|
||||
op.drop_column("provider_details", "priority")
|
||||
op.drop_column("provider_details_history", "priority")
|
||||
|
||||
|
||||
def downgrade():
|
||||
print("ADDING COLUMNS")
|
||||
op.add_column("provider_details", sa.Column("priority", sa.Integer()))
|
||||
op.add_column("provider_details_history", sa.Column("priority", sa.Integer()))
|
||||
op.add_column("provider_details", sa.Column("priority", sa.Integer))
|
||||
op.add_column("provider_details_history", sa.Column("priority", sa.Integer))
|
||||
|
||||
@@ -105,7 +105,6 @@ def test_get_provider_versions_contains_correct_fields(client, notify_db_session
|
||||
"created_by",
|
||||
"display_name",
|
||||
"identifier",
|
||||
"priority",
|
||||
"notification_type",
|
||||
"active",
|
||||
"version",
|
||||
|
||||
@@ -80,12 +80,8 @@ def _notify_db(notify_api):
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def sms_providers(_notify_db):
|
||||
"""
|
||||
In production we randomly choose which provider to use based on their priority. To guarantee tests run the same each
|
||||
time, make sure we always choose sns. You'll need to override them in your tests if you wish to do something
|
||||
different.
|
||||
"""
|
||||
get_provider_details_by_identifier("sns").priority = 100
|
||||
pass
|
||||
# get_provider_details_by_identifier("sns").priority = 100
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
|
||||
Reference in New Issue
Block a user