Пример #1
0
 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)