How to use the jsons.decorators.dumped function in jsons

To help you get started, we’ve selected a few jsons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ramonhagenaars / jsons / test_jsons.py View on Github external
            @dumped()
            def method1(self, c1):
                self_.assertTrue(isinstance(self, C2))
                self_.assertEqual(c1['x'], 'c1')
                return C1('res1')
github ramonhagenaars / jsons / tests / test_decorator.py View on Github external
        @dumped()
        async def func1(c1):
            self.assertEqual(c1['x'], 'c1')
            return C('c_res')
github ramonhagenaars / jsons / tests / test_decorator.py View on Github external
        @dumped(parameters=False)
        def func3(c1):
            self.assertEqual(c1.x, 'c1')
            return C('c_res')
github ramonhagenaars / jsons / test_jsons.py View on Github external
        @dumped()
        def func4(c1: Base) -> Base:
            self.assertEqual(c1['y'], 'c1')
            self.assertFalse(hasattr(c1, 'x'))
            return C('c_res')
github ramonhagenaars / jsons / tests / test_decorator.py View on Github external
        @dumped()
        def func1(c1):
            self.assertEqual(c1['x'], 'c1')
            return C('c_res')
github ramonhagenaars / jsons / test_jsons.py View on Github external
            @dumped()
            def method3(c1):
                self_.assertEqual(c1['x'], 'c1')
                return C1('res3')
github ramonhagenaars / jsons / tests / test_decorator.py View on Github external
                @dumped()
                @staticmethod
                def method4(c1):
                    pass  # This won't work; you need to swap the decorators.
github ramonhagenaars / jsons / test_jsons.py View on Github external
        @dumped()
        async def func1(c1):
            self.assertEqual(c1['x'], 'c1')
            return C('c_res')
github ramonhagenaars / jsons / test_jsons.py View on Github external
        @dumped()
        def func1(c1):
            self.assertEqual(c1['x'], 'c1')
            return C('c_res')