@@ -114,24 +114,20 @@ def test_archive_workspace(client, mocker):
114114
115115def test_add_headers_authentication (client : StructurizrClient , mocker ):
116116 """Validate the headers are added correctly, including authentication."""
117- mocker .patch .object (
118- client ,
119- "_number_once" ,
120- return_value = "1529225966174"
121- )
117+ mocker .patch .object (client , "_number_once" , return_value = "1529225966174" )
122118 request = client ._client .build_request ("GET" , client ._workspace_url )
123119 headers = client ._add_headers (request )
124- assert headers [' Nonce' ] == "1529225966174"
125- assert headers [' X-Authorization' ] == (
126- ' 7f4e4edc-f61c-4ff2-97c9-ea4bc2a7c98c:'
127- ' ZmJhNTVkMDM2NGEwN2I5YjRhMDgwZWNhMjA0ODIzZD'
128- ' kyMTg3YzliMzVhMjBlNmM4ZjAxMDAwOGU4OGJlODEwMQ=='
120+ assert headers [" Nonce" ] == "1529225966174"
121+ assert headers [" X-Authorization" ] == (
122+ " 7f4e4edc-f61c-4ff2-97c9-ea4bc2a7c98c:"
123+ " ZmJhNTVkMDM2NGEwN2I5YjRhMDgwZWNhMjA0ODIzZD"
124+ " kyMTg3YzliMzVhMjBlNmM4ZjAxMDAwOGU4OGJlODEwMQ=="
129125 )
130- assert ' Content-MD5' not in headers
131- assert ' Content-Type' not in headers
126+ assert " Content-MD5" not in headers
127+ assert " Content-Type" not in headers
132128
133129 # Check the additional headers needed for PUTs
134130 request = client ._client .build_request ("PUT" , client ._workspace_url )
135131 headers = client ._add_headers (request , content = "Hello" , content_type = "World" )
136- assert headers [' Content-MD5' ] == ' OGIxYTk5NTNjNDYxMTI5NmE4MjdhYmY4YzQ3ODA0ZDc='
137- assert headers [' Content-Type' ] == ' World'
132+ assert headers [" Content-MD5" ] == " OGIxYTk5NTNjNDYxMTI5NmE4MjdhYmY4YzQ3ODA0ZDc="
133+ assert headers [" Content-Type" ] == " World"
0 commit comments