Beispiel #1
0
def test_no_xpctl_leaves_others():
    key = 'visdom'
    value = {'env': 'example'}
    input_ = {'reporting': {'xpctl': {}, key: value}}
    override_client_settings(input_, None, None)
    assert 'xpctl' not in input_['reporting']
    assert key in input_['reporting']
    assert input_['reporting'][key] == value
Beispiel #2
0
def test_no_xpctl_leaves_others():
    key = 'visdom'
    value = {'env': 'example'}
    input_ = {'reporting': {'xpctl': {}, key: value}}
    override_client_settings(input_, None, None)
    assert 'xpctl' not in input_['reporting']
    assert key in input_['reporting']
    assert input_['reporting'][key] == value
Beispiel #3
0
def test_handles_no_reporting():
    input_ = {}
    gold = 'server-cred'
    override_client_settings(input_, None, gold)
    assert 'reporting' not in input_
Beispiel #4
0
def test_handles_no_xpctl():
    input_ = {'reporting': {}}
    gold = 'server-cred'
    override_client_settings(input_, None, gold)
    assert 'xpctl' not in input_
Beispiel #5
0
def test_xpctl_adds():
    input_ = {'reporting': {'xpctl': {}}}
    gold = 'server-cred'
    override_client_settings(input_, None, gold)
    assert input_['reporting']['xpctl']['cred'] == gold
Beispiel #6
0
def test_no_xpctl_removes_client():
    input_ = {'reporting': {'xpctl': {'label': 'client_stuff'}}}
    override_client_settings(input_, None, None)
    assert 'xpctl' not in input_['reporting']
Beispiel #7
0
def test_cache_added():
    input_ = {}
    gold = 'server_cache'
    override_client_settings(input_, gold, None)
    assert input_['datacache'] == gold
Beispiel #8
0
def test_cache_overwritten():
    old = 'client_cache'
    input_ = {'datacache': old}
    gold = 'server_cache'
    override_client_settings(input_, gold, None)
    assert input_['datacache'] == gold
Beispiel #9
0
def test_handles_no_reporting():
    input_ = {}
    gold = 'server-cred'
    override_client_settings(input_, None, gold)
    assert 'reporting' not in input_
Beispiel #10
0
def test_handles_no_xpctl():
    input_ = {'reporting': {}}
    gold = 'server-cred'
    override_client_settings(input_, None, gold)
    assert 'xpctl' not in input_
Beispiel #11
0
def test_xpctl_adds():
    input_ = {'reporting': {'xpctl': {}}}
    gold = 'server-cred'
    override_client_settings(input_, None, gold)
    assert input_['reporting']['xpctl']['cred'] == gold
Beispiel #12
0
def test_no_xpctl_removes_client():
    input_ = {'reporting': {'xpctl': {'label': 'client_stuff'}}}
    override_client_settings(input_, None, None)
    assert 'xpctl' not in input_['reporting']
Beispiel #13
0
def test_cache_added():
    input_ = {}
    gold = 'server_cache'
    override_client_settings(input_, gold, None)
    assert input_['datacache'] == gold
Beispiel #14
0
def test_cache_overwritten():
    old = 'client_cache'
    input_ = {'datacache': old}
    gold = 'server_cache'
    override_client_settings(input_, gold, None)
    assert input_['datacache'] == gold