Пример #1
0
def test_config_file_tls_file_2():
    a = copy.copy(config_args)
    a.yaml = 'testsection'
    a.cert = '/tmp/foofile'
    b = supervisor_syslog.config_file(a, config_yaml)
    assert 'foofile' in b.cert
Пример #2
0
def test_config_file_tls_file_1():
    a = copy.copy(config_args)
    a.yaml = 'testsection'
    b = supervisor_syslog.config_file(a, config_yaml)
    assert 'tmp' in b.cert
Пример #3
0
def test_config_file_override():
    a = copy.copy(config_args)
    a.yaml = 'testsection'
    b = supervisor_syslog.config_file(a, config_yaml)
    assert b.bsd == True
Пример #4
0
def test_config_file_subsection():
    a = copy.copy(config_args)
    a.yaml = 'testfail'
    with pytest.raises(ValueError) as err:
        supervisor_syslog.config_file(a, config_yaml)
    assert err.match('no such yaml')
Пример #5
0
def test_config_file_overall():
    a = copy.copy(config_args)
    a.yaml = 'testsection'
    supervisor_syslog.config_file(a, config_yaml)
Пример #6
0
def test_config_file_tls_file_3():
    a = copy.copy(config_args)
    a.yaml = 'testsection'
    b = supervisor_syslog.config_file(a, config_yaml)
    assert os.path.isfile(b.cert)