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