We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4394a33 commit 64c8837Copy full SHA for 64c8837
tests/test_cos_api_object.py
@@ -49,6 +49,14 @@ def test_put_object(self):
49
self.assertEqual(200, response.status_code)
50
self.assertTrue(response.hash_crc64ecma > 0)
51
52
+ def test_put_object_with_file(self):
53
+ local_file_path = './test.txt'
54
+ with open(local_file_path, 'wb') as f:
55
+ f.write(b'test')
56
+ response = self.client.put_object(object_key='qcloud_sdk/fake-key', data=open(local_file_path, 'rb'))
57
+ self.assertEqual(200, response.status_code)
58
+ os.remove(local_file_path)
59
+
60
def test_put_object_with_no_content(self):
61
response = self.client.put_object(object_key='qcloud_sdk/fake-key')
62
0 commit comments