anchor.diff:              machine.succeed(api_post("/Startup/Complete"))
   
           with machine.nested("Can login"):
  -            auth_result = machine.succeed(
  +            auth_result_str = machine.succeed(
                   api_post(
                       "/Users/AuthenticateByName",
                       "${payloads.auth}",
                   )
               )
  -            auth_result = json.loads(auth_result)
  +            auth_result = json.loads(auth_result_str)
               auth_token = auth_result["AccessToken"]
               auth_header += f", Token={auth_token}"
   
  -            sessions_result = machine.succeed(api_get("/Sessions"))
  -            sessions_result = json.loads(sessions_result)
  +            sessions_result_str = machine.succeed(api_get("/Sessions"))
  +            sessions_result = json.loads(sessions_result_str)
   
               this_session = [
                   session for session in sessions_result if session["DeviceId"] == "1337"
  
positive.code:             if len(this_session) != 1:
                  raise Exception("Session not created")
  
              me = machine.succeed(api_get("/Users/Me"))
              me = json.loads(me)["Id"]
  
          with machine.nested("Can add library"):
              tempdir = machine.succeed("mktemp -d -p /var/lib/jellyfin").strip()
  
negative.code: 
  
          def is_refreshed(_):
              folders_str = machine.succeed(api_get("/Library/VirtualFolders"))
              folders = json.loads(folders_str)
              print(folders)
              return all(folder["RefreshStatus"] == "Idle" for folder in folders)
  
  