def test_render_access__no_access(self): conf = deepcopy(CONF) conf['access'] = { 'access_list': [], 'is_private': False, } command = Command('BULK_READ_TASKS', conf) assert command.render_access('AccountType') == ( 'BULK_READ_TASKS: null')
def test_render_access(self): conf = deepcopy(CONF) conf['access'] = { 'access_list': [ 'LEARNER', 'MENTOR', ], 'is_private': False, } command = Command('BULK_READ_TASKS', conf) assert command.render_access('AccountType') == ( 'BULK_READ_TASKS: [AccountType.LEARNER,AccountType.MENTOR]')