コード例 #1
0
ファイル: test_profiles.py プロジェクト: timgates42/py2neo
def test_to_dict():
    p = ConnectionProfile()
    d = p.to_dict()
    assert d == {
        'address': IPv4Address(('localhost', 7687)),
        'host': 'localhost',
        'port': 7687,
        'port_number': 7687,
        'protocol': 'bolt',
        'scheme': 'bolt',
        'secure': False,
        'verify': True,
        'uri': 'bolt://neo4j@localhost:7687',
        'user': '******',
    }
コード例 #2
0
ファイル: test_profiles.py プロジェクト: motey/py2neo
def test_to_dict_with_password():
    p = ConnectionProfile()
    d = p.to_dict(include_password=True)
    assert d == {
        'address': IPv4Address(('localhost', 7687)),
        'auth': ('neo4j', 'password'),
        'host': 'localhost',
        'password': '******',
        'port': 7687,
        'port_number': 7687,
        'protocol': 'bolt',
        'scheme': 'bolt',
        'secure': False,
        'verify': True,
        'uri': 'bolt://localhost:7687',
        'user': '******',
    }