def test_json_hook(self):
        # The hook parses dates
        example_input = {
            'date': '/Date(1426849200000+1300)/',
        }

        self.assertEqual(
            xero.utils.json_load_object_hook(example_input),
            {
                'date': datetime.datetime(2015, 3, 21, 0, 0),
            }
        )

        # In both format styles
        example_input = {
            'date': '2015-04-29T00:00:00',
        }

        self.assertEqual(
            xero.utils.json_load_object_hook(example_input),
            {
                'date': datetime.date(2015, 4, 29)
            }
        )

        # And in unicode
        example_input = {
            'date': u'2015-04-29T10:21:03',
        }

        self.assertEqual(
            xero.utils.json_load_object_hook(example_input),
            {
                'date': datetime.datetime(2015, 4, 29, 10, 21, 3)
            }
        )

        # Not a string type
        self.assertEqual(
            xero.utils.json_load_object_hook({'date': 6}),
            {'date': 6}
        )

        self.assertEqual(
            xero.utils.json_load_object_hook({'date': None}),
            {'date': None}
        )
Tests the json hook used in Manager._parse_api_response, and the
dataset/ETHPy150Open freakboy3742/pyxero/tests/utils.py/UtilsTest.test_json_hook