mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 00:28:59 +08:00
Merge pull request #6274 from Ultimaker/fix_umnt_material_call
Fix materials API call
This commit is contained in:
commit
8dd6dd6573
@ -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