Skip to content

Commit

Permalink
More response assertion expansion on headers...
Browse files Browse the repository at this point in the history
  • Loading branch information
llunn committed May 7, 2022
1 parent bd7c2aa commit 2b18066
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/unit/test_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 2b18066

Please sign in to comment.