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': '******', }
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': '******', }