Пример #1
0
def test_get_file_checksum(tmp_dir):
    if not Azure.should_test():
        pytest.skip("no azurite running")

    tmp_dir.gen("foo", "foo")

    remote = AzureRemote(None, {})
    to_info = remote.path_cls(Azure.get_url())
    remote.upload(PathInfo("foo"), to_info)
    assert remote.exists(to_info)
    checksum = remote.get_file_checksum(to_info)
    assert checksum
    assert isinstance(checksum, str)
    assert checksum.strip("'").strip('"') == checksum
Пример #2
0
def test_get_file_hash(tmp_dir):
    if not Azure.should_test():
        pytest.skip("no azurite running")

    tmp_dir.gen("foo", "foo")

    tree = AzureRemoteTree(None, {})
    to_info = tree.PATH_CLS(Azure.get_url())
    tree.upload(PathInfo("foo"), to_info)
    assert tree.exists(to_info)
    hash_ = tree.get_file_hash(to_info)
    assert hash_
    assert isinstance(hash_, str)
    assert hash_.strip("'").strip('"') == hash_
Пример #3
0
 def _should_test(self):
     return Azure.should_test()
Пример #4
0
    def _test(self):
        url = Azure.get_url()

        self.main(["remote", "add", TEST_REMOTE, url])

        self._test_cloud(TEST_REMOTE)
Пример #5
0
 def _get_url(self):
     return Azure.get_url()