Пример #1
0
 def test_init(self, **kwargs):
     """should set response attributes to values in kwargs"""
     args = {
         'success': True,
         'status': 200,
         'meta': { 'content-length': 1024 },
         'raw': 'OK',
         'raw_format': '.html'
     }
     response = Response(**args)
     for k, v in args.items():
         self.assertEqual(v, response.__getattribute__(k))
Пример #2
0
 def test_init(self, **kwargs):
     """should set response attributes to values in kwargs"""
     args = {
         'success': True,
         'status': 200,
         'meta': {
             'content-length': 1024
         },
         'raw': 'OK',
         'raw_format': '.html'
     }
     response = Response(**args)
     for k, v in args.items():
         self.assertEqual(v, response.__getattribute__(k))