def test_delete_db_instance_no_snapshot(aws_client): client = MagicMock() aws_client.return_value = client db_id = 'some-rds-instance-identifier' delete_db_instance(db_instance_identifier=db_id) client.delete_db_instance.assert_called_with(DBInstanceIdentifier=db_id, SkipFinalSnapshot=True, DeleteAutomatedBackups=True)
def test_delete_db_instance(aws_client): client = MagicMock() aws_client.return_value = client db_id = 'some-rds-instance-identifier' delete_db_instance(db_instance_identifier=db_id, skip_final_snapshot=False, db_snapshot_identifier='%s-final-snapshot' % db_id) client.delete_db_instance.assert_called_with( DBInstanceIdentifier=db_id, SkipFinalSnapshot=False, DeleteAutomatedBackups=True, FinalDBSnapshotIdentifier='%s-final-snapshot' % db_id)