Logo Search packages:      
Sourcecode: ubuntuone-file-storage-api version File versions  Download package

def ubuntuone::filestorageapi::tests::test_volumes::RequestTestCase::test_invalid_json (   self )
JSON failure is handled and logged. None is returned.

Definition at line 221 of file test_volumes.py.

                               :
        """JSON failure is handled and logged. None is returned."""

        def value_error(*a, **kw):
            """Simulate a JSON parse error."""
            raise ValueError()

        self.patch(volumes.json, 'load', value_error)
        result = self.obj.get(path='fail')

        self.assertEqual(result, None)
        self.assertTrue(self.memento.check_exception(ValueError))



Generated by  Doxygen 1.6.0   Back to index