Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rculbertson committed Nov 14, 2024
1 parent e0ecf5b commit 5b2bc03
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2030,16 +2030,15 @@ def disable_auto_mount(monkeypatch):

def encode_input_jwt(idx: int, input_id: str, function_call_id: str) -> str:
"""
Dummmy version of function defined in server.
Creates fake input jwt token.
"""
assert str(idx) and input_id and function_call_id
return f"{idx}:{input_id}:{function_call_id}"


def decode_input_jwt(input_jwt: str) -> Tuple[int, str, str]:
"""
Dummmy version of function defined in server.
Returns idx, input_id.
Decodes fake input jwt. Returns idx, input_id.
"""
parts = input_jwt.split(":")
assert len(parts) == 3
Expand All @@ -2048,16 +2047,15 @@ def decode_input_jwt(input_jwt: str) -> Tuple[int, str, str]:

def encode_function_call_jwt(function_id: str, function_call_id: str) -> str:
"""
Dummmy version of function defined in server.
Creates fake function call jwt.
"""
assert function_id and function_call_id
return f"{function_id}:{function_call_id}"


def decode_function_call_jwt(function_call_jwt: str) -> Tuple[str, str]:
"""
Dummmy version of function defined in server.
Returns function_id, function_call_id.
Decodes fake function call jwt. Returns function_id, function_call_id.
"""
parts = function_call_jwt.split(":")
assert len(parts) == 2
Expand Down

0 comments on commit 5b2bc03

Please sign in to comment.