(self)
| 142 | class TestMockOpen(unittest.TestCase): |
| 143 | |
| 144 | def test_mock_open(self): |
| 145 | mock = mock_open() |
| 146 | with patch('%s.open' % __name__, mock, create=True) as patched: |
| 147 | self.assertIs(patched, mock) |
| 148 | open('foo') |
| 149 | |
| 150 | mock.assert_called_once_with('foo') |
| 151 | |
| 152 | |
| 153 | def test_mock_open_context_manager(self): |
nothing calls this directly
no test coverage detected