~gandelman-a/ubuntu/precise/keystone/UCA_2012.2.1

« back to all changes in this revision

Viewing changes to .pc/fix-ubuntu-tests.patch/tests/test_content_types.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Adam Gandelman, Soren Hansen, Logan Rosen, Chuck Short
  • Date: 2012-09-07 13:04:01 UTC
  • mfrom: (1.1.22)
  • Revision ID: package-import@ubuntu.com-20120907130401-o49wh9xxkr2cmuqx
Tags: 2012.2~rc1~20120906.2517-0ubuntu2
[ Adam Gandelman ]
* Refreshed patches.

[ Soren Hansen ]
* Update debian/watch to account for symbolically named tarballs and
  use newer URL.
* Fix Launchpad URLs in debian/watch.

[ Logan Rosen ]
* Fix control file to suggest python-memcache instead of python-memcached
  (LP: #998991).

[ Chuck Short ]
* New upstream version.
* Dont FTBFS if the testsuite fails.

Show diffs side-by-side

added added

removed removed

Lines of Context:
220
220
 
221
221
    def public_request(self, port=None, **kwargs):
222
222
        kwargs['port'] = port or self._public_port()
223
 
        return self.restful_request(**kwargs)
 
223
        response = self.restful_request(**kwargs)
 
224
        self.assertValidResponseHeaders(response)
 
225
        return response
224
226
 
225
227
    def admin_request(self, port=None, **kwargs):
226
228
        kwargs['port'] = port or self._admin_port()
227
 
        return self.restful_request(**kwargs)
 
229
        response = self.restful_request(**kwargs)
 
230
        self.assertValidResponseHeaders(response)
 
231
        return response
228
232
 
229
233
    def get_scoped_token(self):
230
234
        """Convenience method so that we can test authenticated requests."""
621
625
        r = self.admin_request(path=path, expected_status=401)
622
626
        self.assertValidErrorResponse(r)
623
627
 
 
628
    def test_fetch_revocation_list_nonadmin_fails(self):
 
629
        self.admin_request(
 
630
            method='GET',
 
631
            path='/v2.0/tokens/revoked',
 
632
            expected_status=401)
 
633
 
 
634
    def test_fetch_revocation_list_admin_200(self):
 
635
        token = self.get_scoped_token()
 
636
        r = self.restful_request(
 
637
            method='GET',
 
638
            path='/v2.0/tokens/revoked',
 
639
            token=token,
 
640
            expected_status=200,
 
641
            port=self._admin_port())
 
642
        self.assertValidRevocationListResponse(r)
 
643
 
 
644
    def assertValidRevocationListResponse(self, response):
 
645
        self.assertIsNotNone(response.body['signed'])
 
646
 
624
647
 
625
648
class XmlTestCase(RestfulTestCase, CoreApiTests):
626
649
    xmlns = 'http://docs.openstack.org/identity/api/v2.0'