~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_keystoneclient.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-07-06 10:37:01 UTC
  • mfrom: (1.1.20)
  • Revision ID: package-import@ubuntu.com-20120706103701-rswdykm7fqypbavg
Tags: 2012.2~f2-0ubuntu1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
        from keystoneclient import exceptions as client_exceptions
134
134
        client = self.get_client()
135
135
        token = client.auth_token
136
 
        self.assertRaises(client_exceptions.AuthorizationFailure,
137
 
                          self._client, token=token, tenant_id='baz')
 
136
        self.assertRaises(client_exceptions.Unauthorized,
 
137
                          self._client, token=token,
 
138
                          tenant_id=uuid.uuid4().hex)
138
139
 
139
140
    def test_authenticate_token_tenant_name(self):
140
141
        client = self.get_client()
284
285
        self.assertRaises(client_exceptions.Unauthorized,
285
286
                          self._client,
286
287
                          username=self.user_foo['name'],
287
 
                          password='invalid')
 
288
                          password=uuid.uuid4().hex)
288
289
 
289
 
    def test_invalid_user_password(self):
 
290
    def test_invalid_user_and_password(self):
290
291
        from keystoneclient import exceptions as client_exceptions
291
292
 
292
293
        self.assertRaises(client_exceptions.Unauthorized,
293
294
                          self._client,
294
 
                          username='blah',
295
 
                          password='blah')
 
295
                          username=uuid.uuid4().hex,
 
296
                          password=uuid.uuid4().hex)
296
297
 
297
298
    def test_change_password_invalidates_token(self):
298
299
        from keystoneclient import exceptions as client_exceptions
674
675
                          client.services.get,
675
676
                          id=uuid.uuid4().hex)
676
677
 
677
 
    def test_endpoint_create_404(self):
678
 
        from keystoneclient import exceptions as client_exceptions
679
 
        client = self.get_client(admin=True)
680
 
        self.assertRaises(client_exceptions.NotFound,
681
 
                          client.endpoints.create,
682
 
                          region=uuid.uuid4().hex,
683
 
                          service_id=uuid.uuid4().hex,
684
 
                          publicurl=uuid.uuid4().hex,
685
 
                          adminurl=uuid.uuid4().hex,
686
 
                          internalurl=uuid.uuid4().hex)
687
 
 
688
678
    def test_endpoint_delete_404(self):
689
679
        # the catalog backend is expected to return Not Implemented
690
680
        from keystoneclient import exceptions as client_exceptions