~ubuntu-branches/ubuntu/quantal/nova/quantal-proposed

« back to all changes in this revision

Viewing changes to nova/tests/api/openstack/compute/contrib/test_keypairs.py

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman, Adam Gandelman, Chuck Short
  • Date: 2012-08-27 15:37:18 UTC
  • mfrom: (1.1.60)
  • Revision ID: package-import@ubuntu.com-20120827153718-lj8er44eqqz1gsrj
Tags: 2012.2~rc1~20120827.15815-0ubuntu1
[ Adam Gandelman ]
* New upstream release.

[ Chuck Short ]
* debian/patches/0001-Update-tools-hacking-for-pep8-1.2-and-
  beyond.patch: Dropped we dont run pep8 tests anymore.
* debian/control: Drop pep8 build depends
* debian/*.upstart.in: Make sure we transition correctly from runlevel
  1 to 2. (LP: #820694)

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
        res_dict = jsonutils.loads(res.body)
124
124
        self.assertEqual(res.status_int, 400)
125
125
 
126
 
    def test_keypair_create_quota_limit(self):
127
 
 
128
 
        def fake_quotas_count(self, context, resource, *args, **kwargs):
129
 
            return 100
130
 
 
131
 
        self.stubs.Set(QUOTAS, "count", fake_quotas_count)
132
 
 
133
 
        req = webob.Request.blank('/v2/fake/os-keypairs')
134
 
        req.method = 'POST'
135
 
        req.headers['Content-Type'] = 'application/json'
136
 
        body = {'keypair': {'name': 'foo'}}
137
 
        req.body = jsonutils.dumps(body)
138
 
        res = req.get_response(fakes.wsgi_app())
139
 
        self.assertEqual(res.status_int, 413)
140
 
 
141
126
    def test_keypair_import(self):
142
127
        body = {
143
128
            'keypair': {