Ejemplo n.º 1
0
def test_manager(storage_socket):

    assert storage_socket.manager_update(name='first_manager')
    assert storage_socket.manager_update(name='first_manager', submitted=100)
    assert storage_socket.manager_update(name='first_manager', submitted=50)

    ret = storage_socket.get_managers(name='first_manager')
    assert ret['data'][0]['submitted'] == 150

    ret = storage_socket.get_managers(name='first_manager', modified_before=datetime.utcnow())
    assert len(ret['data']) == 1
Ejemplo n.º 2
0
def test_manager(storage_socket):

    assert storage_socket.manager_update(name="first_manager")
    assert storage_socket.manager_update(name="first_manager", submitted=100)
    assert storage_socket.manager_update(name="first_manager", submitted=50)

    ret = storage_socket.get_managers(name="first_manager")
    assert ret["data"][0]["submitted"] == 150

    ret = storage_socket.get_managers(name="first_manager",
                                      modified_before=datetime.utcnow())
    assert len(ret["data"]) == 1