コード例 #1
0
ファイル: test_file.py プロジェクト: djun/python-sdk
def test_create_with_url():  # type: () -> None
    f = File.create_with_url(
        "xxx",
        u"http://i1.wp.com/leancloud.cn/images/static/default-avatar.png",
        meta_data={},
    )
    assert f.url == "http://i1.wp.com/leancloud.cn/images/static/default-avatar.png"
コード例 #2
0
def test_save_external():  # type: () -> None
    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)
    f.save()
    assert f.id
    file_on_cloud = File.create_without_data(f.id)
    file_on_cloud.fetch()
    assert file_on_cloud.name == file_name
    assert file_on_cloud.url == file_url
コード例 #3
0
ファイル: test_file.py プロジェクト: fish-work/python-sdk
def test_create_with_url():
    f = File.create_with_url('xxx', 'http://www.lenna.org/full/len_std.jpg')
    assert f.url == 'http://www.lenna.org/full/len_std.jpg'
コード例 #4
0
ファイル: test_file.py プロジェクト: chaim1986/python-sdk
def test_create_with_url():  # type: () -> None
    f = File.create_with_url(
        'xxx',
        u'http://i1.wp.com/leancloud.cn/images/static/default-avatar.png',
        meta_data={})
    assert f.url == 'http://i1.wp.com/leancloud.cn/images/static/default-avatar.png'
コード例 #5
0
ファイル: test_file.py プロジェクト: chaim1986/python-sdk
def test_thumbnail_url_erorr():  # type: () -> None
    f = File.create_with_url('xx', '')
    f.get_thumbnail_url(100, 100)
コード例 #6
0
ファイル: test_file.py プロジェクト: chaim1986/python-sdk
def test_save_external():  # type: () -> None
    f = File.create_with_url(
        'lenna.jpg',
        'http://i1.wp.com/leancloud.cn/images/static/default-avatar.png')
    f.save()
    assert f.id
コード例 #7
0
ファイル: test_file.py プロジェクト: lord63-forks/python-sdk
def test_thumbnail_url_erorr():
    f = File.create_with_url('xx', False)
    f.get_thumbnail_url(100, 100)
コード例 #8
0
ファイル: test_file.py プロジェクト: lord63-forks/python-sdk
def test_save_external():
    f = File.create_with_url('lenna.jpg', 'http://i1.wp.com/leancloud.cn/images/static/default-avatar.png')
    f.save()
    assert f.id
コード例 #9
0
ファイル: test_file.py プロジェクト: lord63-forks/python-sdk
def test_create_with_url():
    f = File.create_with_url('xxx', 'http://i1.wp.com/leancloud.cn/images/static/default-avatar.png', meta_data={})
    assert f.url == 'http://i1.wp.com/leancloud.cn/images/static/default-avatar.png'
コード例 #10
0
ファイル: test_file.py プロジェクト: gokure/python-sdk
def test_save_external():
    f = File.create_with_url('lenna.jpg', 'http://www.lenna.org/full/len_std.jpg')
    f.save()
    assert f.id
コード例 #11
0
ファイル: test_file.py プロジェクト: gokure/python-sdk
def test_create_with_url():
    f = File.create_with_url('xxx', 'http://www.lenna.org/full/len_std.jpg', meta_data={})
    assert f.url == 'http://www.lenna.org/full/len_std.jpg'
コード例 #12
0
ファイル: test_file.py プロジェクト: leancloud/python-sdk
def test_thumbnail_url_erorr():  # type: () -> None
    f = File.create_with_url('xx', '')
    f.get_thumbnail_url(100, 100)
コード例 #13
0
ファイル: test_file.py プロジェクト: JasonSam/python-sdk
def test_thumbnail_url_erorr():
    f = File.create_with_url('xx', False)
    f.get_thumbnail_url(100, 100)