mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-28 23:04:34 +08:00
Fix materials API call
This commit is contained in:
parent
bc4809d8f8
commit
6591593f59
@ -126,7 +126,7 @@ class SendMaterialJob(Job):
|
||||
.format(file_name = signature_file_name), f.read()))
|
||||
|
||||
Logger.log("d", "Syncing material {material_id} with cluster.".format(material_id = material_id))
|
||||
self.device.postFormWithParts(target = "materials/", parts = parts, on_finished = self.sendingFinished)
|
||||
self.device.postFormWithParts(target = "/materials/", parts = parts, on_finished = self.sendingFinished)
|
||||
|
||||
## Check a reply from an upload to the printer and log an error when the call failed
|
||||
@staticmethod
|
||||
|
@ -210,7 +210,7 @@ class TestSendMaterialJob(TestCase):
|
||||
self.assertEqual(1, device_mock.postFormWithParts.call_count)
|
||||
self.assertEqual(
|
||||
[call.createFormPart("name=\"file\"; filename=\"generic_pla_white.xml.fdm_material\"", "<xml></xml>"),
|
||||
call.postFormWithParts(target = "materials/", parts = ["_xXx_"], on_finished = job.sendingFinished)],
|
||||
call.postFormWithParts(target = "/materials/", parts = ["_xXx_"], on_finished = job.sendingFinished)],
|
||||
device_mock.method_calls)
|
||||
|
||||
@patch("UM.Application.Application.getInstance")
|
||||
@ -240,5 +240,5 @@ class TestSendMaterialJob(TestCase):
|
||||
self.assertEqual(1, device_mock.postFormWithParts.call_count)
|
||||
self.assertEqual(
|
||||
[call.createFormPart("name=\"file\"; filename=\"generic_pla_white.xml.fdm_material\"", "<xml></xml>"),
|
||||
call.postFormWithParts(target = "materials/", parts = ["_xXx_"], on_finished = job.sendingFinished)],
|
||||
call.postFormWithParts(target = "/materials/", parts = ["_xXx_"], on_finished = job.sendingFinished)],
|
||||
device_mock.method_calls)
|
||||
|
Loading…
x
Reference in New Issue
Block a user