How to use test_headers_retain_case method in localstack

Best Python code snippet using localstack_python

test_request.py

Source:test_request.py Github

copy

Full Screen

...96def test_headers_retain_dashes():97 request = Request("GET", "/foo/bar/ed", {"X-Amz-Meta--foo_bar-ed": "foobar"})98 assert "x-amz-meta--foo_bar-ed" in request.headers99 assert request.headers["x-amz-meta--foo_bar-ed"] == "foobar"100def test_headers_retain_case():101 request = Request("GET", "/foo/bar/ed", {"X-Amz-Meta--FOO_BaR-ed": "foobar"})102 keys = list(request.headers.keys())103 for k in keys:104 if k.lower().startswith("x-amz-meta"):105 assert k == "X-Amz-Meta--FOO_BaR-ed"106 return107 pytest.fail(f"key not in header keys {keys}")108def test_multipart_parsing():109 body = (110 b"--4efd159eae0c4f4e125a5a509e073d85"111 b"\r\n"112 b'Content-Disposition: form-data; name="foo"; filename="foo"'113 b"\r\n\r\n"114 b"bar"...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful