Exemplo n.º 1
0
def test_nesteddict_fromdict_creates_2level_nesteddict():
	d = nesteddict.from_dict(
		{'a': 1,
		'b': {'test':{'inner':1}}
		})
	eq_(d['a'], 1)
	assert_is_instance(d['b'], nesteddict)
	eq_(d['b.test.inner'], 1)
Exemplo n.º 2
0
def test_nesteddict_fromdict_creates_nesteddict():
	d = nesteddict.from_dict(
		{'a': 1,
		'b': {'test':'inner'}
		})
	eq_(d['a'], 1)
	eq_(d['b.test'], 'inner')
	eq_(d['b'], {'test': 'inner'})
Exemplo n.º 3
0
def test_nesteddict_from_dict_uses_dot_access():
    ok_(nesteddict.from_dict({'test.test': True})['test.test'])
Exemplo n.º 4
0
def test_nesteddict_fromdict_creates_2level_nesteddict():
    d = nesteddict.from_dict({'a': 1, 'b': {'test': {'inner': 1}}})
    eq_(d['a'], 1)
    assert_is_instance(d['b'], nesteddict)
    eq_(d['b.test.inner'], 1)
Exemplo n.º 5
0
def test_nesteddict_fromdict_creates_nesteddict():
    d = nesteddict.from_dict({'a': 1, 'b': {'test': 'inner'}})
    eq_(d['a'], 1)
    eq_(d['b.test'], 'inner')
    eq_(d['b'], {'test': 'inner'})
Exemplo n.º 6
0
def test_nesteddict_from_dict_uses_dot_access():
	ok_(nesteddict.from_dict({'test.test': True})['test.test'])