From e262e6574d1611ccd1e15902b65d197c0ce11402 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Mon, 27 Oct 2014 18:21:27 +0200 Subject: [PATCH] Fix test for system that doesn't know about application/pgp-keys content-type --- tests/test_client_functional.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_client_functional.py b/tests/test_client_functional.py index b10c4becd3e..29201da9597 100644 --- a/tests/test_client_functional.py +++ b/tests/test_client_functional.py @@ -586,8 +586,12 @@ def test_POST_FILES_SINGLE_BINARY(self): f.seek(0) self.assertEqual(0, len(content['multipart-data'])) self.assertEqual(content['content'], f.read().decode()) - self.assertEqual(content['headers']['Content-Type'], - 'application/pgp-keys') + + # if system cannot determine 'application/pgp-keys' MIME type + # then use 'application/octet-stream' default + self.assertIn(content['headers']['Content-Type'], + ('application/pgp-keys', + 'application/octet-stream')) self.assertEqual(r.status, 200) r.close()