예제 #1
0
def test_redis_storage_get_next_when_empty():
    app = get_app()
    storage = RedisStorage(app)
    storage.clear()

    storage.put(project_id=20, message={"test": "test2"})

    storage.get_next_message()
    retrieved = storage.get_next_message()

    expect(retrieved).to_be_null()
예제 #2
0
def test_redis_storage_get_next_when_empty():
    app = get_app()
    storage = RedisStorage(app)
    storage.clear()

    storage.put(project_id=20, message={
        "test": "test2"
    })

    storage.get_next_message()
    retrieved = storage.get_next_message()

    expect(retrieved).to_be_null()
예제 #3
0
def test_redis_storage_get_next_when_no_projects():
    app = get_app()
    storage = RedisStorage(app)
    storage.clear()

    retrieved = storage.get_next_message()

    expect(retrieved).to_be_null()
예제 #4
0
def test_redis_storage_get_next_when_no_projects():
    app = get_app()
    storage = RedisStorage(app)
    storage.clear()

    retrieved = storage.get_next_message()

    expect(retrieved).to_be_null()
예제 #5
0
def test_redis_storage_get_next():
    app = get_app()
    storage = RedisStorage(app)
    storage.clear()

    msg = {"test": "test2"}

    storage.put(project_id=10, message=msg)

    retrieved = storage.get_next_message()

    expect(retrieved).to_be_like(msg)
예제 #6
0
def test_redis_storage_get_next():
    app = get_app()
    storage = RedisStorage(app)
    storage.clear()

    msg = {
        "test": "test2"
    }

    storage.put(project_id=10, message=msg)

    retrieved = storage.get_next_message()

    expect(retrieved).to_be_like(msg)