@@ -62,11 +62,10 @@ def test_property_description(self):
6262 self .assertIsInstance (cursor .description [0 ], ColumnInfo )
6363
6464 def test_property_rowcount (self ):
65- from google .cloud .spanner_dbapi .cursor import _UNSET_COUNT
66-
6765 connection = self ._make_connection (self .INSTANCE , self .DATABASE )
6866 cursor = self ._make_one (connection )
69- self .assertEqual (cursor .rowcount , _UNSET_COUNT )
67+ with self .assertRaises (NotImplementedError ):
68+ cursor .rowcount
7069
7170 def test_callproc (self ):
7271 from google .cloud .spanner_dbapi .exceptions import InterfaceError
@@ -94,26 +93,25 @@ def test_close(self, mock_client):
9493 cursor .execute ("SELECT * FROM database" )
9594
9695 def test_do_execute_update (self ):
97- from google .cloud .spanner_dbapi .cursor import _UNSET_COUNT
96+ from google .cloud .spanner_dbapi .checksum import ResultsChecksum
9897
9998 connection = self ._make_connection (self .INSTANCE , self .DATABASE )
10099 cursor = self ._make_one (connection )
100+ cursor ._checksum = ResultsChecksum ()
101101 transaction = mock .MagicMock ()
102102
103103 def run_helper (ret_value ):
104104 transaction .execute_update .return_value = ret_value
105- res = cursor ._do_execute_update (
105+ cursor ._do_execute_update (
106106 transaction = transaction , sql = "SELECT * WHERE true" , params = {},
107107 )
108- return res
108+ return cursor . fetchall ()
109109
110110 expected = "good"
111- self .assertEqual (run_helper (expected ), expected )
112- self .assertEqual (cursor ._row_count , _UNSET_COUNT )
111+ self .assertEqual (run_helper (expected ), [expected ])
113112
114113 expected = 1234
115- self .assertEqual (run_helper (expected ), expected )
116- self .assertEqual (cursor ._row_count , expected )
114+ self .assertEqual (run_helper (expected ), [expected ])
117115
118116 def test_execute_programming_error (self ):
119117 from google .cloud .spanner_dbapi .exceptions import ProgrammingError
@@ -706,7 +704,6 @@ def test_setoutputsize(self):
706704
707705 def test_handle_dql (self ):
708706 from google .cloud .spanner_dbapi import utils
709- from google .cloud .spanner_dbapi .cursor import _UNSET_COUNT
710707
711708 connection = self ._make_connection (self .INSTANCE , mock .MagicMock ())
712709 connection .database .snapshot .return_value .__enter__ .return_value = (
@@ -718,7 +715,6 @@ def test_handle_dql(self):
718715 cursor ._handle_DQL ("sql" , params = None )
719716 self .assertEqual (cursor ._result_set , ["0" ])
720717 self .assertIsInstance (cursor ._itr , utils .PeekIterator )
721- self .assertEqual (cursor ._row_count , _UNSET_COUNT )
722718
723719 def test_context (self ):
724720 connection = self ._make_connection (self .INSTANCE , self .DATABASE )
0 commit comments