Skip to content

Commit

Permalink
Skip a test failing due to issue 1448
Browse files Browse the repository at this point in the history
From https://pulp.plan.io/issues/1448:

> When Pulp is asked to generate content applicability for repositories, it
> returns an HTTP 202 (accepted) response. This response should be a [call
> report](http://pulp.readthedocs.org/en/latest/dev-guide/conventions/sync-v-async.html#call-report),
> but it's not.

Test results before this commit:

    ============  =========================================
    Pulp Version  Test Suite Results
    ============  =========================================
    2.7           OK (skipped=13)
    dev (2.8)     FAILED (failures=1, errors=2, skipped=12)
    ============  =========================================

Test results after this commit:

    ============  =============================
    Pulp Version  Test Suite Results
    ============  =============================
    2.7           OK (skipped=13)
    dev (2.8)     FAILED (errors=2, skipped=13)
    ============  =============================
  • Loading branch information
Ichimonji10 committed Dec 21, 2015
1 parent 543532f commit d39545d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pulp_smash/tests/platform/api_v2/test_content_applicability.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from __future__ import unicode_literals

import requests
from packaging.version import Version
from pulp_smash import utils
from pulp_smash.config import get_config
from pulp_smash.constants import CALL_REPORT_KEYS
from unittest2 import TestCase
Expand All @@ -22,16 +24,16 @@ class SuccessTestCase(TestCase):
@classmethod
def setUpClass(cls):
"""Make calls to the server and save the responses."""
cfg = get_config()
cls.cfg = get_config()
path_json_pairs = (
(_CONSUMER, {'consumer_criteria': {}}),
(_REPO, {'repo_criteria': {}})
)
cls.responses = tuple((
requests.post(
cfg.base_url + path,
cls.cfg.base_url + path,
json=json,
**cfg.get_requests_kwargs()
**cls.cfg.get_requests_kwargs()
)
for path, json in path_json_pairs
))
Expand All @@ -46,6 +48,9 @@ def test_body(self):
"""Assert that the responses are JSON and appear to be call reports."""
for i, response in enumerate(self.responses):
with self.subTest(i):
if (i == 1 and self.cfg.version >= Version('2.8') and
utils.bug_is_untestable(1448)):
self.skipTest('https://pulp.plan.io/issues/1448')
self.assertEqual(
frozenset(response.json().keys()),
CALL_REPORT_KEYS,
Expand Down

0 comments on commit d39545d

Please sign in to comment.