Beispiel #1
0
def test_entity_results():
    con = MagicMock()
    con.hkeys.return_value = ['foo']
    con.lrange.return_value = ['{"value":7}']
    assert [{'entity_id': 'foo', 'value': 7}] == entity_results(con, 1, 2)
    assert [7] == entity_values(con, 1, 2)
def test_entity_results():
    con = MagicMock()
    con.hkeys.return_value = ['foo']
    con.lrange.return_value = ['{"value":7}']
    assert [{'entity_id': 'foo', 'value': 7}] == entity_results(con, 1, 2)
    assert [7] == entity_values(con, 1, 2)