Esempio 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)
 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)
Esempio 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)
 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)