Ejemplo n.º 1
0
 def test_export_spreadsheet(self, mock_requests):
     mock_response = mock.Mock()
     mock_response.text = json.dumps({'results': []})
     mock_response.json.return_value = self.mock_dict
     mock_requests.return_value = mock_response
     data = api_utils.export_spreadsheet(YEAR)
     self.assertTrue(data == self.mock_dict)
Ejemplo n.º 2
0
 def test_export_spreadsheet(self, mock_requests):
     mock_response = mock.Mock()
     mock_response.text = json.dumps({'results': []})
     mock_response.json.return_value = self.mock_dict
     mock_requests.return_value = mock_response
     data = api_utils.export_spreadsheet(YEAR)
     self.assertTrue(data == self.mock_dict)
Ejemplo n.º 3
0
 def test_export_spreadsheet_no_data(self, mock_requests):
     mock_response = mock.Mock()
     expected_dict = {}
     mock_response.json.return_value = expected_dict
     mock_requests.return_value = mock_response
     data = api_utils.export_spreadsheet(YEAR)
     self.assertTrue(data == expected_dict)
Ejemplo n.º 4
0
 def test_export_spreadsheet_no_data(self, mock_requests):
     mock_response = mock.Mock()
     expected_dict = {}
     mock_response.json.return_value = expected_dict
     mock_requests.return_value = mock_response
     data = api_utils.export_spreadsheet(YEAR)
     self.assertTrue(data == expected_dict)