コード例 #1
0
ファイル: fabric_utils.py プロジェクト: flopezag/fiware-sdc
def assert_content_in_file(file_name, expected_content):

    file_path = PROVISION_ROOT_PATH.format(file_name)

    fd = StringIO()
    get(file_path, fd)
    file_content = fd.getvalue()

    return expected_content in file_content
コード例 #2
0
def assert_file_exist(test_file_name):
    """
    Fabric assertion: Check if file (result of installing a test product) exists on the current remote hosts.
    :param test_file_name: File name
    :return: True if given file exists on the current remote host (dir: PROVISION_ROOT_PATH).
    """

    file_path = PROVISION_ROOT_PATH.format(test_file_name)
    return files.exists(file_path)
コード例 #3
0
ファイル: fabric_utils.py プロジェクト: Fiware/cloud.SDC
def assert_file_exist(test_file_name):
    """
    Fabric assertion: Check if file (result of installing a test product) exists on the current remote hosts.
    :param test_file_name: File name
    :return: True if given file exists on the current remote host (dir: PROVISION_ROOT_PATH).
    """

    file_path = PROVISION_ROOT_PATH.format(test_file_name)
    return files.exists(file_path)
コード例 #4
0
def assert_content_in_file(file_name, expected_content):
    """
    Fabric assertion: Check if some text is in the specified file (result of installing a test product)
    Provision dir: PROVISION_ROOT_PATH
    :param file_name: File name
    :param expected_content: String to be found in file
    :return: True if given content is in file (dir: PROVISION_ROOT_PATH).
    """

    file_path = PROVISION_ROOT_PATH.format(file_name)

    fd = StringIO()
    get(file_path, fd)
    file_content = fd.getvalue()

    return expected_content in file_content
コード例 #5
0
ファイル: fabric_utils.py プロジェクト: Fiware/cloud.SDC
def assert_content_in_file(file_name, expected_content):
    """
    Fabric assertion: Check if some text is in the specified file (result of installing a test product)
    Provision dir: PROVISION_ROOT_PATH
    :param file_name: File name
    :param expected_content: String to be found in file
    :return: True if given content is in file (dir: PROVISION_ROOT_PATH).
    """

    file_path = PROVISION_ROOT_PATH.format(file_name)

    fd = StringIO()
    get(file_path, fd)
    file_content = fd.getvalue()

    return expected_content in file_content
コード例 #6
0
ファイル: fabric_utils.py プロジェクト: flopezag/fiware-sdc
def assert_file_exist(test_file_name):

    file_path = PROVISION_ROOT_PATH.format(test_file_name)
    return files.exists(file_path)