@@ -45,7 +45,7 @@ class FreshDatabaseTestCase(ServerTestCase):
4545
4646 def setUp (self ):
4747 ServerTestCase .setUp (self )
48- session = GraphDatabase .driver ("bolt://localhost" , auth = auth_token ).session ()
48+ session = GraphDatabase .driver ("bolt://localhost:7687 " , auth = auth_token ).session ()
4949 session .run ("MATCH (n) DETACH DELETE n" )
5050 session .close ()
5151
@@ -54,7 +54,7 @@ class MinimalWorkingExampleTestCase(FreshDatabaseTestCase):
5454
5555 def test_minimal_working_example (self ):
5656 # tag::minimal-example[]
57- driver = GraphDatabase .driver ("bolt://localhost" , auth = basic_auth ("neotest" , "neotest" ))
57+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = basic_auth ("neotest" , "neotest" ))
5858 session = driver .session ()
5959
6060 session .run ("CREATE (a:Person {name:'Arthur', title:'King'})" )
@@ -71,45 +71,45 @@ class ExamplesTestCase(FreshDatabaseTestCase):
7171
7272 def test_construct_driver (self ):
7373 # tag::construct-driver[]
74- driver = GraphDatabase .driver ("bolt://localhost" , auth = basic_auth ("neotest" , "neotest" ))
74+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = basic_auth ("neotest" , "neotest" ))
7575 # end::construct-driver[]
7676 return driver
7777
7878 def test_configuration (self ):
7979 # tag::configuration[]
80- driver = GraphDatabase .driver ("bolt://localhost" , auth = basic_auth ("neotest" , "neotest" ), max_pool_size = 10 )
80+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = basic_auth ("neotest" , "neotest" ), max_pool_size = 10 )
8181 # end::configuration[]
8282 return driver
8383
8484 @skipUnless (SSL_AVAILABLE , "Bolt over TLS is not supported by this version of Python" )
8585 def test_tls_require_encryption (self ):
8686 # tag::tls-require-encryption[]
87- driver = GraphDatabase .driver ("bolt://localhost" , auth = basic_auth ("neotest" , "neotest" ), encrypted = True )
87+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = basic_auth ("neotest" , "neotest" ), encrypted = True )
8888 # end::tls-require-encryption[]
8989
9090 @skipUnless (SSL_AVAILABLE , "Bolt over TLS is not supported by this version of Python" )
9191 def test_tls_trust_on_first_use (self ):
9292 # tag::tls-trust-on-first-use[]
93- driver = GraphDatabase .driver ("bolt://localhost" , auth = basic_auth ("neotest" , "neotest" ), encrypted = True , trust = TRUST_ON_FIRST_USE )
93+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = basic_auth ("neotest" , "neotest" ), encrypted = True , trust = TRUST_ON_FIRST_USE )
9494 # end::tls-trust-on-first-use[]
9595 assert driver
9696
9797 @skip ("testing verified certificates not yet supported " )
9898 def test_tls_signed (self ):
9999 # tag::tls-signed[]
100- driver = GraphDatabase .driver ("bolt://localhost" , auth = basic_auth ("neotest" , "neotest" ), encrypted = True , trust = TRUST_SIGNED_CERTIFICATES )
100+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = basic_auth ("neotest" , "neotest" ), encrypted = True , trust = TRUST_SIGNED_CERTIFICATES )
101101 # end::tls-signed[]
102102 assert driver
103103
104104 @skipUnless (SSL_AVAILABLE , "Bolt over TLS is not supported by this version of Python" )
105105 def test_connect_with_auth_disabled (self ):
106106 # tag::connect-with-auth-disabled[]
107- driver = GraphDatabase .driver ("bolt://localhost" , encrypted = True )
107+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , encrypted = True )
108108 # end::connect-with-auth-disabled[]
109109 assert driver
110110
111111 def test_statement (self ):
112- driver = GraphDatabase .driver ("bolt://localhost" , auth = auth_token )
112+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = auth_token )
113113 session = driver .session ()
114114 # tag::statement[]
115115 result = session .run ("CREATE (person:Person {name: {name}})" , {"name" : "Arthur" })
@@ -118,7 +118,7 @@ def test_statement(self):
118118 session .close ()
119119
120120 def test_statement_without_parameters (self ):
121- driver = GraphDatabase .driver ("bolt://localhost" , auth = auth_token )
121+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = auth_token )
122122 session = driver .session ()
123123 # tag::statement-without-parameters[]
124124 result = session .run ("CREATE (person:Person {name: 'Arthur'})" )
@@ -127,7 +127,7 @@ def test_statement_without_parameters(self):
127127 session .close ()
128128
129129 def test_result_traversal (self ):
130- driver = GraphDatabase .driver ("bolt://localhost" , auth = auth_token )
130+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = auth_token )
131131 session = driver .session ()
132132 # tag::result-traversal[]
133133 search_term = "Sword"
@@ -140,7 +140,7 @@ def test_result_traversal(self):
140140 session .close ()
141141
142142 def test_access_record (self ):
143- driver = GraphDatabase .driver ("bolt://localhost" , auth = auth_token )
143+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = auth_token )
144144 session = driver .session ()
145145 # tag::access-record[]
146146 search_term = "Arthur"
@@ -153,7 +153,7 @@ def test_access_record(self):
153153 session .close ()
154154
155155 def test_result_retention (self ):
156- driver = GraphDatabase .driver ("bolt://localhost" , auth = auth_token )
156+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = auth_token )
157157 # tag::retain-result[]
158158 session = driver .session ()
159159 result = session .run ("MATCH (knight:Person:Knight) WHERE knight.castle = {castle} "
@@ -166,7 +166,7 @@ def test_result_retention(self):
166166 assert isinstance (retained_result , list )
167167
168168 def test_nested_statements (self ):
169- driver = GraphDatabase .driver ("bolt://localhost" , auth = auth_token )
169+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = auth_token )
170170 session = driver .session ()
171171 # tag::nested-statements[]
172172 result = session .run ("MATCH (knight:Person:Knight) WHERE knight.castle = {castle} "
@@ -179,7 +179,7 @@ def test_nested_statements(self):
179179 session .close ()
180180
181181 def test_transaction_commit (self ):
182- driver = GraphDatabase .driver ("bolt://localhost" , auth = auth_token )
182+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = auth_token )
183183 session = driver .session ()
184184 # tag::transaction-commit[]
185185 with session .begin_transaction () as tx :
@@ -192,7 +192,7 @@ def test_transaction_commit(self):
192192 session .close ()
193193
194194 def test_transaction_rollback (self ):
195- driver = GraphDatabase .driver ("bolt://localhost" , auth = auth_token )
195+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = auth_token )
196196 session = driver .session ()
197197 # tag::transaction-rollback[]
198198 with session .begin_transaction () as tx :
@@ -205,7 +205,7 @@ def test_transaction_rollback(self):
205205 session .close ()
206206
207207 def test_result_summary_query_profile (self ):
208- driver = GraphDatabase .driver ("bolt://localhost" , auth = auth_token )
208+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = auth_token )
209209 session = driver .session ()
210210 # tag::result-summary-query-profile[]
211211 result = session .run ("PROFILE MATCH (p:Person {name: {name}}) "
@@ -217,7 +217,7 @@ def test_result_summary_query_profile(self):
217217 session .close ()
218218
219219 def test_result_summary_notifications (self ):
220- driver = GraphDatabase .driver ("bolt://localhost" , auth = auth_token )
220+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = auth_token )
221221 session = driver .session ()
222222 # tag::result-summary-notifications[]
223223 result = session .run ("EXPLAIN MATCH (king), (queen) RETURN king, queen" )
@@ -228,7 +228,7 @@ def test_result_summary_notifications(self):
228228 session .close ()
229229
230230 def test_handle_cypher_error (self ):
231- driver = GraphDatabase .driver ("bolt://localhost" , auth = auth_token )
231+ driver = GraphDatabase .driver ("bolt://localhost:7687 " , auth = auth_token )
232232 session = driver .session ()
233233 with self .assertRaises (RuntimeError ):
234234 # tag::handle-cypher-error[]
0 commit comments