STAR-322: Testing cloud printing

This commit is contained in:
Daniel Schiavini 2018-12-10 16:11:43 +01:00
parent d482924ea2
commit bfd236dae4
9 changed files with 129 additions and 37 deletions

View file

@ -0,0 +1,12 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import json
import os
def readFixture(fixture_name: str) -> bytes:
with open("{}/{}.json".format(os.path.dirname(__file__), fixture_name), "rb") as f:
return f.read()
def parseFixture(fixture_name: str) -> dict:
return json.loads(readFixture(fixture_name).decode())

View file

@ -0,0 +1,7 @@
{
"data": {
"cluster_job_id": "9a59d8e9-91d3-4ff6-b4cb-9db91c4094dd",
"job_id": "ABCDefGHIjKlMNOpQrSTUvYxWZ0-1234567890abcDE=",
"status": "queued"
}
}

View file

@ -0,0 +1,10 @@
{
"data": {
"content_type": "text/plain",
"download_url": "https://api.ultimaker.com/print-job-download",
"job_id": "ABCDefGHIjKlMNOpQrSTUvYxWZ0-1234567890abcDE=",
"job_name": "Ultimaker Robot v3.0",
"status": "queued",
"upload_url": "https://api.ultimaker.com/print-job-upload"
}
}