コード例 #1
0
 def test_download_files(self, mock_clean, mock_download_zip):
     mock_download_zip.return_value = True
     update_ipeds.download_files()
     self.assertTrue(mock_download_zip.call_count == 3)
     self.assertTrue(mock_clean.call_count == 1)
     mock_download_zip.return_value = False
     update_ipeds.download_files()
     self.assertTrue(mock_download_zip.call_count == 6)
     self.assertTrue(mock_clean.call_count == 2)
コード例 #2
0
ファイル: test_scripts.py プロジェクト: cfpb/college-costs
 def test_download_files(self, mock_clean, mock_download_zip):
     mock_download_zip.return_value = True
     update_ipeds.download_files()
     self.assertTrue(mock_download_zip.call_count == 3)
     self.assertTrue(mock_clean.call_count == 1)
     mock_download_zip.return_value = False
     update_ipeds.download_files()
     self.assertTrue(mock_download_zip.call_count == 6)
     self.assertTrue(mock_clean.call_count == 2)