from pybbix.api.history import History

import pytest


@pytest.mark.parametrize('params', (
    {'hostid': '10', 'history': 0},
    {'output': 'extend',
     'itemids': '23296',
     'history': 0,
     'sortfield': 'clock',
     'sortorder': 'DESC',
     'limit': 10
     },
))
def test_history_api_get(params):
    hist = History()
    req = hist.get(**params)
    assert req == {'jsonrpc': '2.0', 'method': 'history.get',
                   'params': params, 'id': 1, 'auth': None}
