@mock.patch('api.models.logger')
    def test_app_release_notes_in_logs(self, mock_logger):
        url = '/v1/apps'
        app_name = 'autotest'
        body = {'id': app_name}

        response = self.client.post(url, json.dumps(body), content_type='application/json',
                                    HTTP_AUTHORIZATION='token {}'.format(self.token))
        self.assertEqual(response.status_code, 201)
        app = App.objects.get(id=app_name)
        # check app logs
        exp_msg = "[{app_name}]: {self.user.username} created initial release".format(**locals())
        mock_logger.log.assert_called_with(logging.INFO, exp_msg)
        app.log('hello world')
        exp_msg = "[{app_name}]: hello world".format(**locals())
        mock_logger.log.assert_called_with(logging.INFO, exp_msg)
        app.log('goodbye world', logging.WARNING)
        # assert logging with a different log level
        exp_msg = "[{app_name}]: goodbye world".format(**locals())
        mock_logger.log.assert_called_with(logging.WARNING, exp_msg)
Parses a string using Jinja templating.
dataset/ETHPy150Open deis/deis/controller/api/tests/test_app.py/AppTest.test_app_release_notes_in_logs--crossover with--dataset/ETHPy150Open oppia/oppia/jinja_utils.py/parse_string