import json# Reading JSON test data:
with open("test_data/users.json", "r", encoding="utf-8") as f:
users = json.load(f)
# Parsing JSON string from an API response:
response_json = json.loads('{"id": 101, "status": "active"}')
print(response_json["status"])
# Writing logs:
with open("logs/run.log", "a", encoding="utf-8") as log_file:
log_file.write("Test completed successfully\n")