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'}])
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))
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' }])
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))