コード例 #1
0
ファイル: test_scripts.py プロジェクト: cfpb/college-costs
 def test_write_clean_csv(self):
     m = mock_open()
     with patch("__builtin__.open", m, create=True):
         update_ipeds.write_clean_csv('/tmp/mockfile.csv',
                                      ['a ', ' b', ' c '],
                                      ['a', 'b', 'c'],
                                      [{'a ': 'd', ' b': 'e', ' c ': 'f'}])
     self.assertTrue(m.call_count == 1)
コード例 #2
0
 def test_write_clean_csv(self):
     m = mock_open()
     with patch("builtins.open", m, create=True):
         update_ipeds.write_clean_csv(
             '/tmp/mockfile.csv',
             ['a ', ' b', ' c '],
             ['a', 'b', 'c'],
             [{'a ': 'd', ' b': 'e', ' c ': 'f'}])
     self.assertTrue(m.call_count == 1)