Пример #1
0
    def test_get_bulk_read_field__empty_schema(self):

        conf = deepcopy(CONF)
        conf['schemas'] = {
            'output': {
                'schema': {},
                'uri': 'hi/there',
            },
        }

        command = Command('BULK_READ_TASKS', conf)

        assert command.get_bulk_read_field() is None
Пример #2
0
    def test_get_bulk_read_field(self):

        conf = deepcopy(CONF)
        conf['schemas'] = {
            'output': {
                'schema': {
                    'type': 'object',
                    'properties': {
                        'tasks': {
                            'type': 'array',
                        }
                    }
                },
                'uri': 'hi/there',
            },
        }

        command = Command('BULK_READ_TASKS', conf)

        assert command.get_bulk_read_field() == 'tasks'
Пример #3
0
    def test_get_bulk_read_field__not_bulk_read_name(self):

        command = Command('READ_TASK', CONF)

        assert command.get_bulk_read_field() is None