Refactor the sms sender code to remove any unused methods.

Refactor tests/db/create_service() to behave more like the real world.
Created new create_service_with_inbound_number and create_service_with_defined_sms_sender() test/db methods.
This commit is contained in:
Rebecca Law
2017-11-07 14:26:18 +00:00
parent 430342b567
commit 0054361044
15 changed files with 224 additions and 379 deletions

View File

@@ -223,7 +223,7 @@ class Service(db.Model, Versioned):
created_by_id = db.Column(UUID(as_uuid=True), db.ForeignKey('users.id'), index=True, nullable=False)
_reply_to_email_address = db.Column("reply_to_email_address", db.Text, index=False, unique=False, nullable=True)
_letter_contact_block = db.Column('letter_contact_block', db.Text, index=False, unique=False, nullable=True)
sms_sender = db.Column(db.String(11), nullable=False, default=lambda: current_app.config['FROM_NUMBER'])
sms_sender = db.Column(db.String(11), nullable=True)
prefix_sms = db.Column(db.Boolean, nullable=True)
organisation_id = db.Column(UUID(as_uuid=True), db.ForeignKey('organisation.id'), index=True, nullable=True)
free_sms_fragment_limit = db.Column(db.BigInteger, index=False, unique=False, nullable=True)