Exemplo n.º 1
0
 def test_strip_requires_auth_from_message_body(self):
     body = [{'message': 'look here', 'requires_response': True},
             {'message': 'also here', 'requires_response': False},
             {'message': 'here thing'}]
     self.assertTrue(strip_requires_response_from_message_body(body))
     self.assertListEqual(body,
                          [{'message': 'look here'}, {'message': 'also here'}, {'message': 'here thing'}])
Exemplo n.º 2
0
 def test_strip_requires_auth_from_message_body_none_require_response(self):
     body = [{
         'message': 'look here',
         'requires_response': False
     }, {
         'message': 'also here',
         'requires_response': False
     }, {
         'message': 'here thing'
     }]
     self.assertFalse(strip_requires_response_from_message_body(body))
Exemplo n.º 3
0
 def test_strip_requires_auth_from_message_body(self):
     body = [{
         'message': 'look here',
         'requires_response': True
     }, {
         'message': 'also here',
         'requires_response': False
     }, {
         'message': 'here thing'
     }]
     self.assertTrue(strip_requires_response_from_message_body(body))
     self.assertListEqual(body, [{
         'message': 'look here'
     }, {
         'message': 'also here'
     }, {
         'message': 'here thing'
     }])
Exemplo n.º 4
0
 def test_strip_requires_auth_from_message_body_none_require_response(self):
     body = [{'message': 'look here', 'requires_response': False},
             {'message': 'also here', 'requires_response': False},
             {'message': 'here thing'}]
     self.assertFalse(strip_requires_response_from_message_body(body))