Adding layers
You can add layers.
{"".join(paragraphs)}' f'#!/usr/bin/env python3 """Tests for fetch_lambda_layer_permissions.py, on pages in the AWS Lambda Developer Guide's markup.""" from __future__ import annotations import pytest import fetch_lambda_layer_permissions as f ASKS = ("
Make sure that you have permission to call the GetLayerVersion API on the\n"
" layer version. For Event Functions in your AWS account, you must have this permission in\n"
" your user policy. To use a layer in another account, the owner of that account must "
"grant your account permission in a resource-based policy.
You can add layers.
{"".join(paragraphs)}' f'Layers are versioned.
")) # A sentence asking for an API AWS rewords is refused rather than dropping its action. with pytest.raises(ValueError, match="in no wording it used"): f.build(page(ASKS.replace("Make sure that you have", "You need"))) def test_the_file_is_stale_when_the_page_says_something_else(): vendored = f.build(page(ASKS)) assert not f.stale(vendored, page(ASKS)) assert f.stale(vendored, page(ASKS.replace("on the\n layer version", "on the\n layer")))