def test_get_webassets_env_from_request(self): from pyramid_webassets import get_webassets_env_from_request from pyramid_webassets import IWebAssetsEnvironment request = Mock() request.registry = Mock() queryUtility = Mock() request.registry.queryUtility = queryUtility env = get_webassets_env_from_request(request) queryUtility.assert_called_with(IWebAssetsEnvironment) assert env is not None
def test_get_webassets_env_from_request(self): from pyramid_webassets import get_webassets_env_from_request from pyramid_webassets import IWebAssetsEnvironment request = Mock() request.registry = Mock() queryUtility = Mock() request.registry.queryUtility = queryUtility env = get_webassets_env_from_request(request) queryUtility.assert_called_with(IWebAssetsEnvironment) assert env is not None