<s> """<STR_LIT>""" <EOL> import unittest <EOL> from mock import Mock <EOL> from freezer_api . api . common import middleware <EOL> class TestHealthApp ( unittest . TestCase ) : <EOL> def test_call_nested_app ( self ) : <EOL> mock_app = Mock ( ) <EOL> mock_app . return_value = [ '<STR_LIT>' ] <EOL> health_app = middleware . HealthApp ( mock_app , '<STR_LIT>' ) <EOL> environ = { } <EOL> start_response = Mock ( ) <EOL> result = health_app ( environ , start_response ) <EOL> self . assertEqual ( result , [ '<STR_LIT>' ] ) <EOL> def test_return_200_when_paths_match ( self ) : <EOL> mock_app = Mock ( ) <EOL> mock_app . return_value = [ '<STR_LIT>' ] <EOL> health_app = middleware . HealthApp ( mock_app , '<STR_LIT>' ) <EOL> environ = { '<STR_LIT>' : '<STR_LIT>' } <EOL> start_response = Mock ( ) <EOL> result = health_app ( environ , start_response ) <EOL> start_response . assert_called_once_with ( '<STR_LIT>' , [ ] ) <EOL> self . assertEqual ( result , [ ] ) </s>
