'Test the "update_db" task.'

@ddt.data([{}], [{'settings': 'aws'}])
@ddt.unpack
def test_update_db(self, options):

    settings = options.get('settings', Env.DEVSTACK_SETTINGS)
    call_task('pavelib.servers.update_db', options=options)
    db_command = 'NO_EDXAPP_SUDO=1    EDX_PLATFORM_SETTINGS_OVERRIDE={settings}    /edx/bin/edxapp-migrate-{server}    --traceback    --pythonpath=.    '
    self.assertEquals(self.task_messages, [db_command.format(server='lms', settings=settings), db_command.format(server='cms', settings=settings)])
