You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
430 B
Python
15 lines
430 B
Python
from src.context import set_request_id, get_request_id, set_user_id, get_user_id
|
|
|
|
def test_request_id_context():
|
|
test_id = "test-request-id-123"
|
|
set_request_id(test_id)
|
|
assert get_request_id() == test_id
|
|
|
|
def test_user_id_context():
|
|
test_uid = "user-456"
|
|
set_user_id(test_uid)
|
|
assert get_user_id() == test_uid
|
|
|
|
def test_context_default_none():
|
|
assert get_request_id() is None or get_request_id() != ""
|