Esempio n. 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
Esempio n. 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
Esempio n. 3
0
def test_handles_no_reporting():
    input_ = {}
    gold = 'server-cred'
    override_client_settings(input_, None, gold)
    assert 'reporting' not in input_
Esempio n. 4
0
def test_handles_no_xpctl():
    input_ = {'reporting': {}}
    gold = 'server-cred'
    override_client_settings(input_, None, gold)
    assert 'xpctl' not in input_
Esempio n. 5
0
def test_xpctl_adds():
    input_ = {'reporting': {'xpctl': {}}}
    gold = 'server-cred'
    override_client_settings(input_, None, gold)
    assert input_['reporting']['xpctl']['cred'] == gold
Esempio n. 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']
Esempio n. 7
0
def test_cache_added():
    input_ = {}
    gold = 'server_cache'
    override_client_settings(input_, gold, None)
    assert input_['datacache'] == gold
Esempio n. 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
Esempio n. 9
0
def test_handles_no_reporting():
    input_ = {}
    gold = 'server-cred'
    override_client_settings(input_, None, gold)
    assert 'reporting' not in input_
Esempio n. 10
0
def test_handles_no_xpctl():
    input_ = {'reporting': {}}
    gold = 'server-cred'
    override_client_settings(input_, None, gold)
    assert 'xpctl' not in input_
Esempio n. 11
0
def test_xpctl_adds():
    input_ = {'reporting': {'xpctl': {}}}
    gold = 'server-cred'
    override_client_settings(input_, None, gold)
    assert input_['reporting']['xpctl']['cred'] == gold
Esempio n. 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']
Esempio n. 13
0
def test_cache_added():
    input_ = {}
    gold = 'server_cache'
    override_client_settings(input_, gold, None)
    assert input_['datacache'] == gold
Esempio n. 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