def test_create_login_volume():
    dst_dir = "/bbx/input"
    value = [{"type": "literal", "src": "literal_string", "dst": TMP_FILE_NAME}]
    volume = login.create_login_volume(dst_dir, value)

    dir_path = os.path.join(login.TEMPORARY_DIRECTORY, dst_dir.strip("/"))
    hlpr.assert_file_not_empty(os.path.join(dir_path, TMP_FILE_NAME))
    hlpr.assert_file_contents_equal(os.path.join(dir_path, TMP_FILE_NAME), "literal_string")
    nose.assert_in(":".join([dir_path, dst_dir, "rw"]), volume)
def test_create_login_volume():
    dst_dir = '/bbx/input'
    value   = [{'type': 'literal', 'src': 'literal_string', 'dst': TMP_FILE_NAME}]
    volume  = login.create_login_volume(dst_dir, value)

    dir_path = os.path.join(login.TEMPORARY_DIRECTORY, dst_dir.strip("/"))
    hlpr.assert_file_not_empty(os.path.join(dir_path, TMP_FILE_NAME))
    hlpr.assert_file_contents_equal(os.path.join(dir_path, TMP_FILE_NAME), 'literal_string')
    assert ':'.join([dir_path, dst_dir, 'rw']) in volume
def test_create_login_volume():
    dst_dir = '/bbx/input'
    value = [{
        'type': 'literal',
        'src': 'literal_string',
        'dst': TMP_FILE_NAME
    }]
    volume = login.create_login_volume(dst_dir, value)

    dir_path = os.path.join(login.TEMPORARY_DIRECTORY, dst_dir.strip("/"))
    hlpr.assert_file_not_empty(os.path.join(dir_path, TMP_FILE_NAME))
    hlpr.assert_file_contents_equal(os.path.join(dir_path, TMP_FILE_NAME),
                                    'literal_string')
    nose.assert_in(':'.join([dir_path, dst_dir, 'rw']), volume)
def test_create_login_file_literal():
    value = {'type': 'literal', 'src': 'literal_string', 'dst': TMP_FILE_NAME}
    login.create_login_file(TMP_DIR, value)
    hlpr.assert_file_contents_equal(TMP_PATH, 'literal_string')
def test_create_login_file_literal():
    value = {"type": "literal", "src": "literal_string", "dst": TMP_FILE_NAME}
    login.create_login_file(TMP_DIR, value)
    hlpr.assert_file_contents_equal(TMP_PATH, "literal_string")
def test_create_login_file_literal():
    value = {'type': 'literal', 'src': 'literal_string', 'dst': TMP_FILE_NAME}
    login.create_login_file(TMP_DIR, value)
    hlpr.assert_file_contents_equal(TMP_PATH, 'literal_string')