def test_get_thread_local_requests_returns_back_request_if_present():
    assert thread_local.get_thread_local_requests() == ['foo']
예제 #2
0
def test_get_thread_local_requests_returns_back_request_if_present():
    assert thread_local.get_thread_local_requests() == ['foo']
def test_get_thread_local_requests_creates_empty_list_if_not_attached():
    delattr(thread_local._thread_local, "requests")
    assert not hasattr(thread_local._thread_local, "requests")
    assert thread_local.get_thread_local_requests() == []
    assert hasattr(thread_local._thread_local, "requests")
예제 #4
0
def test_get_thread_local_requests_creates_empty_list_if_not_attached():
    delattr(thread_local._thread_local, "requests")
    assert not hasattr(thread_local._thread_local, "requests")
    assert thread_local.get_thread_local_requests() == []
    assert hasattr(thread_local._thread_local, "requests")