def _update_code(self, doc_name, code=None, suggested_format='pdf', check_response=True):
        self.client.login(username=self.username, password=self.password)
        url, data = self._get_tests_file(doc_name, code, suggested_format)
        content = encode_multipart('BoUnDaRyStRiNg', data)
        response = self.client.put(url, content, content_type='multipart/form-data; boundary=BoUnDaRyStRiNg')
        if check_response:
            self.assertEqual(response.status_code, 200)
        return response
Method to uploade an already existing document into DMS
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/libraries/adlibre/dms/base_test.py/DMSTestCase._update_code