Esempio n. 1
0
 def test_update(self):
     range_ = Range(1, 2, 1, 2, sheet="test")
     body = ValueRange(range_, Dimension.ROWS, values=[[3]])
     response = self.repository.update(range_,
                                       body,
                                       ValueInputOption.RAW,
                                       include_values_in_response=True)
     self.assertEqual(body.get_str_values(), response.updated_data.values)
Esempio n. 2
0
 def test_get(self):
     range_ = Range(1, 1, 1, 1, sheet="test")
     expect = ValueRange(Range.init_from_str("test!A1"),
                         Dimension.ROWS,
                         values=[[1]])
     actual = self.repository.get(range_=range_,
                                  major_dimension=Dimension.ROWS)
     self.assertEqual(expect.get_str_values(), actual.values)
     self.assertEqual(str(expect.range), str(actual.range))
     self.assertEqual(expect.major_dimension, actual.major_dimension)