Esempio n. 1
0
 def test_dump_csv(self):
     m = mock_open()
     with patch("__builtin__.open", m, create=True):
         update_ipeds.dump_csv('/tmp/mockfile.csv',
                               ['a', 'b', 'c'],
                               [{'a': 'd', 'b': 'e', 'c': 'f'}])
     self.assertTrue(m.call_count == 1)
Esempio n. 2
0
    def test_dump_csv(self):
        m = mock_open()
        with patch("builtins.open", m, create=True):
            update_ipeds.dump_csv(
                '/tmp/mockfile.csv',
                ['a', 'b', 'c'],
                [{'a': 'd', 'b': 'e', 'c': 'f'}])

        self.assertTrue(m.call_count == 1)