'Ensure commands sent to the environment for collect_assets are as expected'

@ddt.data([{'collect_log_args': {}, 'expected_log_location': '>    /dev/null'}], [{'collect_log_args': {COLLECTSTATIC_LOG_DIR_ARG: '/foo/bar'}, 'expected_log_location': '>    /foo/bar/lms-collectstatic.log'}], [{'systems': ['lms', 'cms'], 'collect_log_args': {}, 'expected_log_location': '>    /dev/null'}])
@ddt.unpack
def test_collect_assets(self, options):

    specified_log_loc = options.get('collect_log_args', {})
    specified_log_dict = specified_log_loc
    log_loc = options.get('expected_log_location', '>    /dev/null')
    systems = options.get('systems', ['lms'])
    expected_messages = self._set_expected_messages(log_location=log_loc, systems=systems)
    if (specified_log_loc is None):
        collect_assets(systems, Env.DEVSTACK_SETTINGS)
    else:
        collect_assets(systems, Env.DEVSTACK_SETTINGS, **specified_log_dict)
    self.assertEqual(self.task_messages, expected_messages)
