@@ -176,3 +176,50 @@ def test_to_dict(self):
176176 b'name2:col3' : cell3 ,
177177 }
178178 self .assertEqual (result , expected_result )
179+
180+
181+ class TestPartialRowsData (unittest2 .TestCase ):
182+
183+ def _getTargetClass (self ):
184+ from gcloud .bigtable .row_data import PartialRowsData
185+ return PartialRowsData
186+
187+ def _makeOne (self , * args , ** kwargs ):
188+ return self ._getTargetClass ()(* args , ** kwargs )
189+
190+ def test_constructor (self ):
191+ response_iterator = object ()
192+ partial_rows_data = self ._makeOne (response_iterator )
193+ self .assertTrue (partial_rows_data ._response_iterator
194+ is response_iterator )
195+ self .assertEqual (partial_rows_data ._rows , {})
196+
197+ def test___eq__ (self ):
198+ response_iterator = object ()
199+ partial_rows_data1 = self ._makeOne (response_iterator )
200+ partial_rows_data2 = self ._makeOne (response_iterator )
201+ self .assertEqual (partial_rows_data1 , partial_rows_data2 )
202+
203+ def test___eq__type_differ (self ):
204+ partial_rows_data1 = self ._makeOne (None )
205+ partial_rows_data2 = object ()
206+ self .assertNotEqual (partial_rows_data1 , partial_rows_data2 )
207+
208+ def test___ne__same_value (self ):
209+ response_iterator = object ()
210+ partial_rows_data1 = self ._makeOne (response_iterator )
211+ partial_rows_data2 = self ._makeOne (response_iterator )
212+ comparison_val = (partial_rows_data1 != partial_rows_data2 )
213+ self .assertFalse (comparison_val )
214+
215+ def test___ne__ (self ):
216+ response_iterator1 = object ()
217+ partial_rows_data1 = self ._makeOne (response_iterator1 )
218+ response_iterator2 = object ()
219+ partial_rows_data2 = self ._makeOne (response_iterator2 )
220+ self .assertNotEqual (partial_rows_data1 , partial_rows_data2 )
221+
222+ def test_rows_getter (self ):
223+ partial_rows_data = self ._makeOne (None )
224+ partial_rows_data ._rows = value = object ()
225+ self .assertTrue (partial_rows_data .rows is value )
0 commit comments