コード例 #1
0
    def test_positive_content_override(self):
        """Positive content override

        @Feature: Activation key copy

        @Steps:

        1. Create activation key and add content
        2. Get the first product's label
        3. Override the product's content enabled state
        4. Verify that the command succeeded

        @BZ: 1180282

        @Assert: Activation key content override was successful
        """
        result = setup_org_for_a_custom_repo({u"url": FAKE_0_YUM_REPO, u"organization-id": self.org["id"]})
        content = ActivationKey.product_content({u"id": result["activationkey-id"], u"organization-id": self.org["id"]})
        for override_value in (u"1", u"0"):
            with self.subTest(override_value):
                ActivationKey.content_override(
                    {
                        u"content-label": content[0]["label"],
                        u"id": result["activationkey-id"],
                        u"organization-id": self.org["id"],
                        u"value": override_value,
                    }
                )
                # Retrieve the product content enabled flag
                content = ActivationKey.product_content(
                    {u"id": result["activationkey-id"], u"organization-id": self.org["id"]}
                )
                self.assertEqual(content[0]["enabled?"], override_value)
コード例 #2
0
    def test_positive_content_override(self):
        """Positive content override

        :id: a4912cc0-3bf7-4e90-bb51-ec88b2fad227

        :Steps:

            1. Create activation key and add content
            2. Get the first product's label
            3. Override the product's content enabled state
            4. Verify that the command succeeded

        :expectedresults: Activation key content override was successful

        :CaseLevel: System
        """
        result = setup_org_for_a_custom_repo({
            u'url':
            FAKE_0_YUM_REPO,
            u'organization-id':
            self.org['id'],
        })
        content = ActivationKey.product_content({
            u'id':
            result['activationkey-id'],
            u'organization-id':
            self.org['id'],
        })
        for override_value in (True, False):
            with self.subTest(override_value):
                ActivationKey.content_override({
                    u'content-label':
                    content[0]['label'],
                    u'id':
                    result['activationkey-id'],
                    u'organization-id':
                    self.org['id'],
                    u'value':
                    int(override_value),
                })
                # Retrieve the product content enabled flag
                content = ActivationKey.product_content({
                    u'id':
                    result['activationkey-id'],
                    u'organization-id':
                    self.org['id'],
                })
                self.assertEqual(content[0]['enabled?'],
                                 str(override_value).lower())
コード例 #3
0
    def test_positive_add_custom_product(self):
        """Test that custom product can be associated to Activation Keys

        :id: 96ace967-e165-4069-8ff7-f54c4c822de0

        :expectedresults: Custom products are successfully associated to
            Activation key

        :CaseLevel: System

        :BZ: 1426386
        """
        result = setup_org_for_a_custom_repo({
            u'url':
            FAKE_0_YUM_REPO,
            u'organization-id':
            self.org['id'],
        })
        repo = Repository.info({u'id': result['repository-id']})
        content = ActivationKey.product_content({
            u'id':
            result['activationkey-id'],
            u'organization-id':
            self.org['id'],
        })
        self.assertEqual(content[0]['name'], repo['name'])
コード例 #4
0
    def test_positive_add_redhat_product(self):
        """Test that RH product can be associated to Activation Keys

        :id: 7b15de8e-edde-41aa-937b-ad6aa529891a

        :expectedresults: RH products are successfully associated to Activation
            key

        :CaseLevel: System
        """
        org = make_org()
        # Using CDN as we need this repo to be RH one no matter are we in
        # downstream or cdn
        result = setup_org_for_a_rh_repo(
            {
                u'product': PRDS['rhel'],
                u'repository-set': REPOSET['rhst7'],
                u'repository': REPOS['rhst7']['name'],
                u'organization-id': org['id'],
            },
            force_use_cdn=True)
        content = ActivationKey.product_content({
            u'id':
            result['activationkey-id'],
            u'organization-id':
            org['id'],
        })
        self.assertEqual(content[0]['name'], REPOSET['rhst7'])
コード例 #5
0
    def test_positive_add_custom_product(self):
        """Test that custom product can be associated to Activation Keys

        @Feature: Activation key - Product

        @Assert: Custom products are successfully associated to Activation key
        """
        result = setup_org_for_a_custom_repo({u"url": FAKE_0_YUM_REPO, u"organization-id": self.org["id"]})
        repo = Repository.info({u"id": result["repository-id"]})
        content = ActivationKey.product_content({u"id": result["activationkey-id"], u"organization-id": self.org["id"]})
        self.assertEqual(content[0]["name"], repo["name"])
コード例 #6
0
    def test_positive_content_override(self):
        """Positive content override

        :id: a4912cc0-3bf7-4e90-bb51-ec88b2fad227

        :Steps:

            1. Create activation key and add content
            2. Get the first product's label
            3. Override the product's content enabled state
            4. Verify that the command succeeded

        :expectedresults: Activation key content override was successful

        :CaseLevel: System
        """
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': self.org['id'],
        })
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        for override_value in (True, False):
            with self.subTest(override_value):
                ActivationKey.content_override({
                    u'content-label': content[0]['label'],
                    u'id': result['activationkey-id'],
                    u'organization-id': self.org['id'],
                    u'value': int(override_value),
                })
                # Retrieve the product content enabled flag
                content = ActivationKey.product_content({
                    u'id': result['activationkey-id'],
                    u'organization-id': self.org['id'],
                })
                self.assertEqual(
                    content[0]['override'],
                    'enabled:{}'.format(int(override_value))
                )
コード例 #7
0
    def test_positive_add_redhat_and_custom_products(self):
        """Test if RH/Custom product can be associated to Activation key

        :id: 74c77426-18f5-4abb-bca9-a2135f7fcc1f

        :Steps:

            1. Create Activation key
            2. Associate RH product(s) to Activation Key
            3. Associate custom product(s) to Activation Key

        :expectedresults: RH/Custom product is successfully associated to
            Activation key

        :CaseLevel: System

        :BZ: 1426386
        """
        org = make_org()
        # Using CDN as we need this repo to be RH one no matter are we in
        # downstream or cdn
        result = setup_org_for_a_rh_repo(
            {
                u'product': PRDS['rhel'],
                u'repository-set': REPOSET['rhst7'],
                u'repository': REPOS['rhst7']['name'],
                u'organization-id': org['id'],
            },
            force_use_cdn=True)
        result = setup_org_for_a_custom_repo({
            u'url':
            FAKE_0_YUM_REPO,
            u'organization-id':
            org['id'],
            u'activationkey-id':
            result['activationkey-id'],
            u'content-view-id':
            result['content-view-id'],
            u'lifecycle-environment-id':
            result['lifecycle-environment-id'],
        })
        repo = Repository.info({u'id': result['repository-id']})
        content = ActivationKey.product_content({
            u'id':
            result['activationkey-id'],
            u'organization-id':
            org['id'],
        })
        self.assertEqual(len(content), 2)
        self.assertEqual({REPOSET['rhst7'], repo['name']},
                         {pc['name']
                          for pc in content})
コード例 #8
0
    def test_positive_content_override(self):
        """Positive content override

        @Feature: Activation key copy

        @Steps:

        1. Create activation key and add content
        2. Get the first product's label
        3. Override the product's content enabled state
        4. Verify that the command succeeded

        @BZ: 1180282

        @Assert: Activation key content override was successful
        """
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': self.org['id'],
        })
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        for override_value in (u'1', u'0'):
            with self.subTest(override_value):
                ActivationKey.content_override({
                    u'content-label': content[0]['label'],
                    u'id': result['activationkey-id'],
                    u'organization-id': self.org['id'],
                    u'value': override_value,
                })
                # Retrieve the product content enabled flag
                content = ActivationKey.product_content({
                    u'id': result['activationkey-id'],
                    u'organization-id': self.org['id'],
                })
                self.assertEqual(content[0]['enabled?'], override_value)
コード例 #9
0
    def test_positive_content_override(self):
        """@Test: Positive content override

        @Feature: Activation key copy

        @Steps:

        1. Create activation key and add content
        2. Get the first product's label
        3. Override the product's content enabled state
        4. Verify that the command succeeded

        @BZ: 1180282

        @Assert: Activation key content override was successful
        """
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': self.org['id'],
        })
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        for override_value in (u'1', u'0'):
            with self.subTest(override_value):
                ActivationKey.content_override({
                    u'content-label': content[0]['label'],
                    u'id': result['activationkey-id'],
                    u'organization-id': self.org['id'],
                    u'value': override_value,
                })
                # Retrieve the product content enabled flag
                content = ActivationKey.product_content({
                    u'id': result['activationkey-id'],
                    u'organization-id': self.org['id'],
                })
                self.assertEqual(content[0]['enabled?'], override_value)
コード例 #10
0
    def test_positive_content_override(self):
        """@Test: Positive content override

        @Feature: Activation key copy

        @Steps:

        1. Create activation key and add content
        2. Get the first product's label
        3. Override the product's content enablement
        4. Verify that the command succeeded

        @BZ: 1180282

        @Assert: Activation key content override was successful

        """
        if self.pub_key is None:
            self._make_public_key()
        result = ActivationKey.product_content({
            u'id': self.pub_key['key_id'],
            u'organization-id': self.pub_key['org_id'],
        })
        for override_value in (u'1', u'0'):
            with self.subTest(override_value):
                result = ActivationKey.content_override({
                    u'content-label': result[0]['label'],
                    u'id': self.pub_key['key_id'],
                    u'organization-id': self.pub_key['org_id'],
                    u'value': override_value,
                })
                # Retrieve the product content enabled flag
                result = ActivationKey.product_content({
                    u'id': self.pub_key['key_id'],
                    u'organization-id': self.pub_key['org_id'],
                })
                self.assertEqual(result[0]['enabled?'], override_value)
コード例 #11
0
    def test_positive_add_custom_product(self):
        """Test that custom product can be associated to Activation Keys

        @Feature: Activation key - Product

        @Assert: Custom products are successfully associated to Activation key
        """
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': self.org['id'],
        })
        repo = Repository.info({u'id': result['repository-id']})
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        self.assertEqual(content[0]['name'], repo['name'])
コード例 #12
0
    def test_positive_add_custom_product(self):
        """@Test: Test that custom product can be associated to Activation Keys

        @Feature: Activation key - Product

        @Assert: Custom products are successfully associated to Activation key
        """
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': self.org['id'],
        })
        repo = Repository.info({u'id': result['repository-id']})
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        self.assertEqual(content[0]['name'], repo['name'])
コード例 #13
0
    def test_positive_add_custom_product(self):
        """Test that custom product can be associated to Activation Keys

        @id: 96ace967-e165-4069-8ff7-f54c4c822de0

        @Assert: Custom products are successfully associated to Activation key

        @CaseLevel: System
        """
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': self.org['id'],
        })
        repo = Repository.info({u'id': result['repository-id']})
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        self.assertEqual(content[0]['name'], repo['name'])
コード例 #14
0
    def test_positive_add_redhat_product(self):
        """Test that RH product can be associated to Activation Keys

        @Feature: Activation key - Product

        @BZ: 1293585

        @Assert: RH products are successfully associated to Activation key
        """
        result = setup_org_for_a_rh_repo(
            {
                u"product": PRDS["rhel"],
                u"repository-set": REPOSET["rhst7"],
                u"repository": REPOS["rhst7"]["name"],
                u"organization-id": self.org["id"],
            }
        )
        content = ActivationKey.product_content({u"id": result["activationkey-id"], u"organization-id": self.org["id"]})
        self.assertEqual(content[0]["name"], REPOSET["rhst7"])
コード例 #15
0
    def test_positive_add_redhat_and_custom_products(self):
        """Test if RH/Custom product can be associated to Activation key

        :id: 74c77426-18f5-4abb-bca9-a2135f7fcc1f

        :Steps:

            1. Create Activation key
            2. Associate RH product(s) to Activation Key
            3. Associate custom product(s) to Activation Key

        :expectedresults: RH/Custom product is successfully associated to
            Activation key

        :CaseLevel: System

        :BZ: 1426386
        """
        org = make_org()
        # Using CDN as we need this repo to be RH one no matter are we in
        # downstream or cdn
        result = setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': org['id'],
        }, force_use_cdn=True)
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': org['id'],
            u'activationkey-id': result['activationkey-id'],
            u'content-view-id': result['content-view-id'],
            u'lifecycle-environment-id': result['lifecycle-environment-id'],
        })
        repo = Repository.info({u'id': result['repository-id']})
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': org['id'],
        })
        self.assertEqual(len(content), 2)
        self.assertEqual(
            {REPOSET['rhst7'], repo['name']}, {pc['name'] for pc in content})
コード例 #16
0
    def test_positive_add_redhat_product(self):
        """@Test: Test that RH product can be associated to Activation Keys

        @Feature: Activation key - Product

        @BZ: 1293585

        @Assert: RH products are successfully associated to Activation key
        """
        result = setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': self.org['id'],
        })
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        self.assertEqual(content[0]['name'], REPOSET['rhst7'])
コード例 #17
0
    def test_positive_add_redhat_product(self):
        """Test that RH product can be associated to Activation Keys

        @id: 7b15de8e-edde-41aa-937b-ad6aa529891a

        @Assert: RH products are successfully associated to Activation key

        @CaseLevel: System
        """
        result = setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': self.org['id'],
        })
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        self.assertEqual(content[0]['name'], REPOSET['rhst7'])
コード例 #18
0
    def test_positive_add_redhat_product(self):
        """Test that RH product can be associated to Activation Keys

        @Feature: Activation key - Product

        @BZ: 1293585

        @Assert: RH products are successfully associated to Activation key
        """
        result = setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': self.org['id'],
        })
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        self.assertEqual(content[0]['name'], REPOSET['rhst7'])
コード例 #19
0
    def test_positive_create_content_and_check_enabled(self):
        """Create activation key and add content to it. Check enabled state.

        :id: abfc6c6e-acd1-4761-b309-7e68e1d17172

        :expectedresults: Enabled state is shown for product content
            successfully

        :BZ: 1361993

        :CaseLevel: Integration
        """
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': self.org['id'],
        })
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        self.assertEqual(content[0]['enabled?'], 'true')
コード例 #20
0
    def test_positive_add_redhat_product(self):
        """Test that RH product can be associated to Activation Keys

        @id: 7b15de8e-edde-41aa-937b-ad6aa529891a

        @Assert: RH products are successfully associated to Activation key

        @CaseLevel: System
        """
        org = make_org()
        result = setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': org['id'],
        })
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': org['id'],
        })
        self.assertEqual(content[0]['name'], REPOSET['rhst7'])
コード例 #21
0
    def test_positive_create_content_and_check_enabled(self):
        """Create activation key and add content to it. Check enabled state.

        :id: abfc6c6e-acd1-4761-b309-7e68e1d17172

        :expectedresults: Enabled state is shown for product content
            successfully

        :BZ: 1361993

        :CaseLevel: Integration
        """
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': self.org['id'],
        })
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        self.assertEqual(content[0]['enabled?'], 'true')
コード例 #22
0
    def test_positive_add_redhat_and_custom_products(self):
        """Test if RH/Custom product can be associated to Activation key

        @id: 74c77426-18f5-4abb-bca9-a2135f7fcc1f

        @Steps:

        1. Create Activation key
        2. Associate RH product(s) to Activation Key
        3. Associate custom product(s) to Activation Key

        @Assert: RH/Custom product is successfully associated to Activation key

        @CaseLevel: System
        """
        org = make_org()
        result = setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': org['id'],
        })
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': org['id'],
            u'activationkey-id': result['activationkey-id'],
            u'content-view-id': result['content-view-id'],
            u'lifecycle-environment-id': result['lifecycle-environment-id'],
        })
        repo = Repository.info({u'id': result['repository-id']})
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': org['id'],
        })
        self.assertEqual(len(content), 2)
        self.assertEqual(
            {REPOSET['rhst7'], repo['name']}, {pc['name'] for pc in content})
コード例 #23
0
    def test_positive_add_redhat_and_custom_products(self):
        """Test if RH/Custom product can be associated to Activation key

        @Feature: Activation key - Product

        @Steps:

        1. Create Activation key
        2. Associate RH product(s) to Activation Key
        3. Associate custom product(s) to Activation Key

        @BZ: 1293585

        @Assert: RH/Custom product is successfully associated to Activation key
        """
        result = setup_org_for_a_rh_repo(
            {
                u"product": PRDS["rhel"],
                u"repository-set": REPOSET["rhst7"],
                u"repository": REPOS["rhst7"]["name"],
                u"organization-id": self.org["id"],
            }
        )
        result = setup_org_for_a_custom_repo(
            {
                u"url": FAKE_0_YUM_REPO,
                u"organization-id": self.org["id"],
                u"activationkey-id": result["activationkey-id"],
                u"content-view-id": result["content-view-id"],
                u"lifecycle-environment-id": result["lifecycle-environment-id"],
            }
        )
        repo = Repository.info({u"id": result["repository-id"]})
        content = ActivationKey.product_content({u"id": result["activationkey-id"], u"organization-id": self.org["id"]})
        self.assertEqual(len(content), 2)
        self.assertEqual(content[0]["name"], REPOSET["rhst7"])
        self.assertEqual(content[1]["name"], repo["name"])
コード例 #24
0
    def test_positive_add_redhat_and_custom_products(self):
        """@Test: Test if RH/Custom product can be associated to Activation key

        @Feature: Activation key - Product

        @Steps:

        1. Create Activation key
        2. Associate RH product(s) to Activation Key
        3. Associate custom product(s) to Activation Key

        @BZ: 1293585

        @Assert: RH/Custom product is successfully associated to Activation key
        """
        result = setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': self.org['id'],
        })
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': self.org['id'],
            u'activationkey-id': result['activationkey-id'],
            u'content-view-id': result['content-view-id'],
            u'lifecycle-environment-id': result['lifecycle-environment-id'],
        })
        repo = Repository.info({u'id': result['repository-id']})
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        self.assertEqual(len(content), 2)
        self.assertEqual(content[0]['name'], REPOSET['rhst7'])
        self.assertEqual(content[1]['name'], repo['name'])
コード例 #25
0
    def test_positive_content_override(self):
        """@Test: Positive content override

        @Feature: Activation key copy

        @Steps:

        1. Create activation key and add content
        2. Get the first product's label
        3. Override the product's content enablement
        4. Verify that the command succeeded

        @Assert: Activation key content override was successful

        """
        if not bz_bug_is_open(1180282):
            self.fail(
                'BZ 1180282 has been closed. This test should be updated to'
                'verify value change via product-content.'
            )
        if self.pub_key is None:
            self._make_public_key()
        result = ActivationKey.product_content({
            u'id': self.pub_key['key_id'],
            u'organization-id': self.pub_key['org_id'],
        })
        product_label = result[3].split('|')[5].replace(' ', '')
        for override_value in (u'1', u'0'):
            with self.subTest(override_value):
                result = ActivationKey.content_override({
                    u'content-label': product_label,
                    u'id': self.pub_key['key_id'],
                    u'organization-id': self.pub_key['org_id'],
                    u'value': override_value,
                })
                self.assertIn(result[0], 'Updated content override')
コード例 #26
0
    def test_positive_add_redhat_and_custom_products(self):
        """Test if RH/Custom product can be associated to Activation key

        @Feature: Activation key - Product

        @Steps:

        1. Create Activation key
        2. Associate RH product(s) to Activation Key
        3. Associate custom product(s) to Activation Key

        @BZ: 1293585

        @Assert: RH/Custom product is successfully associated to Activation key
        """
        result = setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': self.org['id'],
        })
        result = setup_org_for_a_custom_repo({
            u'url': FAKE_0_YUM_REPO,
            u'organization-id': self.org['id'],
            u'activationkey-id': result['activationkey-id'],
            u'content-view-id': result['content-view-id'],
            u'lifecycle-environment-id': result['lifecycle-environment-id'],
        })
        repo = Repository.info({u'id': result['repository-id']})
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': self.org['id'],
        })
        self.assertEqual(len(content), 2)
        self.assertEqual(content[0]['name'], REPOSET['rhst7'])
        self.assertEqual(content[1]['name'], repo['name'])
コード例 #27
0
    def test_positive_add_redhat_product(self):
        """Test that RH product can be associated to Activation Keys

        :id: 7b15de8e-edde-41aa-937b-ad6aa529891a

        :expectedresults: RH products are successfully associated to Activation
            key

        :CaseLevel: System
        """
        org = make_org()
        # Using CDN as we need this repo to be RH one no matter are we in
        # downstream or cdn
        result = setup_org_for_a_rh_repo({
            u'product': PRDS['rhel'],
            u'repository-set': REPOSET['rhst7'],
            u'repository': REPOS['rhst7']['name'],
            u'organization-id': org['id'],
        }, force_use_cdn=True)
        content = ActivationKey.product_content({
            u'id': result['activationkey-id'],
            u'organization-id': org['id'],
        })
        self.assertEqual(content[0]['name'], REPOSET['rhst7'])