$ python -m unittest pulp_smash.tests.rpm.api_v2.test_download_policies.OnDemandTestCase ...F..F. ====================================================================== FAIL: test_rpm_cache_control_header (pulp_smash.tests.rpm.api_v2.test_download_policies.OnDemandTestCase) Assert the request has the Cache-Control header set. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ichimonji10/code/pulp-smash/pulp_smash/tests/rpm/api_v2/test_download_policies.py", line 206, in test_rpm_cache_control_header self.assertIn(key, headers) AssertionError: 'Cache-Control' not found in {'Server': 'TwistedWeb/16.3.0', 'Connection': 'Keep-Alive', 'Via': '1.1 fedora-24-pulp-2-12 (squid/3.5.20)', 'Content-Type': 'text/html; charset=UTF-8', 'Keep-Alive': 'timeout=5, max=9999', 'X-Cache-Lookup': 'MISS from fedora-24-pulp-2-12:3128', 'Transfer-Encoding': 'chunked', 'X-Cache': 'MISS from fedora-24-pulp-2-12', 'Date': 'Tue, 14 Feb 2017 19:55:41GMT'} ====================================================================== FAIL: test_same_rpm_cache_header (pulp_smash.tests.rpm.api_v2.test_download_policies.OnDemandTestCase) Assert the second request resulted in a cache hit from Squid. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ichimonji10/code/pulp-smash/pulp_smash/tests/rpm/api_v2/test_download_policies.py", line 222, in test_same_rpm_cache_header self.assertIn('HIT', headers['X-Cache-Lookup'], headers) AssertionError: 'HIT' not found in 'MISS from fedora-24-pulp-2-12:3128' : {'Server': 'TwistedWeb/16.3.0', 'Connection': 'Keep-Alive','Via': '1.1 fedora-24-pulp-2-12 (squid/3.5.20)', 'Content-Type': 'text/html; charset=UTF-8', 'Keep-Alive': 'timeout=5, max=9999', 'X-Cache-Lookup': 'MISS from fedora-24-pulp-2-12:3128', 'Transfer-Encoding': 'chunked', 'X-Cache': 'MISS from fedora-24-pulp-2-12', 'Date': 'Tue, 14 Feb 2017 19:55:41 GMT'} ---------------------------------------------------------------------- Ran 8 tests in 53.447s FAILED (failures=2) $ python -m unittest pulp_smash.tests.rpm.api_v2.test_download_policies.SwitchPoliciesTestCase .F.F.. ====================================================================== FAIL: test_background_to_on_demand (pulp_smash.tests.rpm.api_v2.test_download_policies.SwitchPoliciesTestCase) Check if switching from background to on_demand works. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ichimonji10/code/pulp-smash/pulp_smash/tests/rpm/api_v2/test_download_policies.py", line 498, in test_background_to_on_demand self.assert_on_demand(repo) File "/home/ichimonji10/code/pulp-smash/pulp_smash/tests/rpm/api_v2/test_download_policies.py", line 487, in assert_on_demand same_rpm.headers, AssertionError: 'HIT' not found in 'MISS from fedora-24-pulp-2-12:3128' : {'Via': '1.1 fedora-24-pulp-2-12 (squid/3.5.20)', 'Date': 'Tue, 14 Feb 2017 20:01:08 GMT', 'X-Cache-Lookup': 'MISS from fedora-24-pulp-2-12:3128', 'X-Cache': 'MISS from fedora-24-pulp-2-12', 'Connection': 'Keep-Alive', 'Server': 'TwistedWeb/16.3.0', 'Keep-Alive': 'timeout=5, max=9999', 'Content-Type': 'text/html; charset=UTF-8', 'Transfer-Encoding': 'chunked'} ====================================================================== FAIL: test_immediate_to_on_demand (pulp_smash.tests.rpm.api_v2.test_download_policies.SwitchPoliciesTestCase) Check if switching from immediate to on_demand works. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ichimonji10/code/pulp-smash/pulp_smash/tests/rpm/api_v2/test_download_policies.py", line 508, in test_immediate_to_on_demand self.assert_on_demand(repo) File "/home/ichimonji10/code/pulp-smash/pulp_smash/tests/rpm/api_v2/test_download_policies.py", line 487, in assert_on_demand same_rpm.headers, AssertionError: 'HIT' not found in 'MISS from fedora-24-pulp-2-12:3128' : {'Via': '1.1 fedora-24-pulp-2-12 (squid/3.5.20)', 'Date': 'Tue, 14 Feb 2017 20:02:45 GMT', 'X-Cache-Lookup': 'MISS from fedora-24-pulp-2-12:3128', 'X-Cache': 'MISS from fedora-24-pulp-2-12', 'Connection': 'Keep-Alive', 'Server': 'TwistedWeb/16.3.0', 'Keep-Alive': 'timeout=5, max=9999', 'Content-Type': 'text/html; charset=UTF-8', 'Transfer-Encoding': 'chunked'} ---------------------------------------------------------------------- Ran 6 tests in 293.807s FAILED (failures=2)