def test_input_arguments(self):
     request = make_request()
     request.matchdict = {"document_id": "my-testing-doc"}
     request.validated = {
         "filename": "0034-8910-rsp-48-2-0347.xml",
         "data_url":
         "https://files.scielo.br/aksjhdf/0034-8910-rsp-48-2-0347.pdf",
         "mimetype": "application/pdf",
         "lang": "pt",
         "size_bytes": 23456,
     }
     request.services["register_rendition_version"] = Mock()
     restfulapi.register_rendition_version(request)
     request.services["register_rendition_version"].assert_called_once_with(
         "my-testing-doc",
         "0034-8910-rsp-48-2-0347.xml",
         "https://files.scielo.br/aksjhdf/0034-8910-rsp-48-2-0347.pdf",
         "application/pdf",
         "pt",
         23456,
     )
 def test_returns_HTTPNoContent_on_success(self):
     request = make_request()
     request.matchdict = {"document_id": "my-testing-doc"}
     request.validated = {
         "filename": "0034-8910-rsp-48-2-0347.xml",
         "data_url":
         "https://files.scielo.br/aksjhdf/0034-8910-rsp-48-2-0347.pdf",
         "mimetype": "application/pdf",
         "lang": "pt",
         "size_bytes": 23456,
     }
     request.services["register_rendition_version"] = Mock()
     response = restfulapi.register_rendition_version(request)
     self.assertIsInstance(response, HTTPNoContent)