From 2b18066aca8f4f9cce840e0b715959139c1f5ff1 Mon Sep 17 00:00:00 2001 From: Lee Lunn Date: Sat, 7 May 2022 12:46:12 -0300 Subject: [PATCH] More response assertion expansion on headers... --- tests/unit/test_design.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_design.py b/tests/unit/test_design.py index 699a290..3357361 100644 --- a/tests/unit/test_design.py +++ b/tests/unit/test_design.py @@ -181,7 +181,22 @@ def test_attachment_headers(httpserver: test_server.HTTPServer): httpserver.expect_request("/_local/_design/ddoc_name/attachment", method="HEAD").respond_with_json({}, headers=expected) response = couch.db.design.attachment.headers(uri_segments={'db': '_local', 'ddoc': 'ddoc_name', 'attname': 'attachment'}) - assert response == expected + + assert 'Accept-Ranges' in response + assert response['Accept-Ranges'] == expected['Accept-Ranges'] + assert 'Cache-Control' in response + assert response['Cache-Control'] == expected['Cache-Control'] + assert 'Content-Encoding' in response + assert response['Content-Encoding'] == expected['Content-Encoding'] + assert 'Content-Length' in response + assert response['Content-Length'] == expected['Content-Length'] + assert 'Content-Type' in response + assert response['Content-Type'] == expected['Content-Type'] + assert 'Date' in response + assert 'ETag' in response + assert response['ETag'] == expected['ETag'] + assert 'Server' in response + def test_get_attachment(httpserver: test_server.HTTPServer):