Ubuntu Pastebin

Paste from Marco Ceppi at Thu, 17 Mar 2016 15:12:03 +0000

Download as text
1
2
3
4
5
    @patch('builtins.open' if sys.version_info > (3,) else '__builtin__.open')
    def test_environments(self, mock_open):
        mock_open.return_value.__enter__ = lambda s: s
        mock_open.return_value.__exit__ = Mock()
        mock_open.return_value.read.return_value = "file contents"
Download as text