Пример #1
0
def test__get_key_name():
    log_name = 'x'
    log_version = 'y'
    return_value = _get_key_name(log_name, log_version)
    s3_log_prefix = staticconf.read_string('s3_log_prefix')
    path_re = re.compile(PATH_RE_PREFIX.format(s3_log_prefix))
    assert path_re.match(return_value) is not None
Пример #2
0
def test__get_key_name():
    log_name = 'x'
    log_version = 'y'
    return_value = _get_key_name(log_name, log_version)
    s3_log_prefix = staticconf.read_string('s3_log_prefix')
    path_re = re.compile(PATH_RE_PREFIX.format(s3_log_prefix))
    assert path_re.match(return_value) is not None
Пример #3
0
def test__get_key_name_1():
    log_name = ''
    log_version = 'y'
    with pytest.raises(ValueError):
        _get_key_name(log_name, log_version)
Пример #4
0
def test__get_key_name_2(log_name, log_version):
    with pytest.raises(ValueError):
        _get_key_name(log_name, log_version)
Пример #5
0
def test__get_key_name_1():
    log_name = ''
    log_version = 'y'
    with pytest.raises(ValueError):
        _get_key_name(log_name, log_version)
Пример #6
0
def test__get_key_name_2(log_name, log_version):
    with pytest.raises(ValueError):
        _get_key_name(log_name, log_version)