We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 204d29e commit c030e69Copy full SHA for c030e69
1 file changed
tests/test_file.py
@@ -111,11 +111,15 @@ def test_query(): # type: () -> None
111
112
@with_setup(setup_func)
113
def test_save_external(): # type: () -> None
114
- f = File.create_with_url(
115
- "lenna.jpg", "http://i1.wp.com/leancloud.cn/images/static/default-avatar.png"
116
- )
+ file_name = "lenna.jpg"
+ file_url = "http://i1.wp.com/leancloud.cn/images/static/default-avatar.png"
+ f = File.create_with_url(file_name, file_url)
117
f.save()
118
assert f.id
119
+ file_on_cloud = File.create_without_data(f.id)
120
+ file_on_cloud.fetch()
121
+ assert file_on_cloud.name == file_name
122
+ assert file_on_cloud.url == file_url
123
124
125
@raises(ValueError)
0 commit comments