~ubuntu-branches/ubuntu/raring/nova/raring-proposed

« back to all changes in this revision

Viewing changes to nova/tests/api/openstack/compute/test_flavors.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Adam Gandelman, Chuck Short
  • Date: 2012-11-23 09:04:58 UTC
  • mfrom: (1.1.66)
  • Revision ID: package-import@ubuntu.com-20121123090458-91565o7aev1i1h71
Tags: 2013.1~g1-0ubuntu1
[ Adam Gandelman ]
* debian/control: Ensure novaclient is upgraded with nova,
  require python-keystoneclient >= 1:2.9.0. (LP: #1073289)
* debian/patches/{ubuntu/*, rbd-security.patch}: Dropped, applied
  upstream.
* debian/control: Add python-testtools to Build-Depends.

[ Chuck Short ]
* New upstream version.
* Refreshed debian/patches/avoid_setuptools_git_dependency.patch.
* debian/rules: FTBFS if missing binaries.
* debian/nova-scheudler.install: Add missing rabbit-queues and
  nova-rpc-zmq-receiver.
* Remove nova-volume since it doesnt exist anymore, transition to cinder-*.
* debian/rules: install apport hook in the right place.
* debian/patches/ubuntu-show-tests.patch: Display test failures.
* debian/control: Add depends on genisoimage
* debian/control: Suggest guestmount.
* debian/control: Suggest websockify. (LP: #1076442)
* debian/nova.conf: Disable nova-volume service.
* debian/control: Depend on xen-system-* rather than the hypervisor.
* debian/control, debian/mans/nova-conductor.8, debian/nova-conductor.init,
  debian/nova-conductor.install, debian/nova-conductor.logrotate
  debian/nova-conductor.manpages, debian/nova-conductor.postrm
  debian/nova-conductor.upstart.in: Add nova-conductor service.
* debian/control: Add python-fixtures as a build deps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from nova import context
27
27
from nova import db
28
28
from nova import exception
29
 
from nova import flags
30
29
from nova import test
31
30
from nova.tests.api.openstack import fakes
32
 
 
33
 
 
34
 
FLAGS = flags.FLAGS
35
 
 
 
31
from nova.tests import matchers
36
32
 
37
33
NS = "{http://docs.openstack.org/compute/api/v1.1}"
38
34
ATOMNS = "{http://www.w3.org/2005/Atom}"
219
215
               'rel': 'next'}
220
216
            ]
221
217
        }
222
 
        self.assertDictMatch(flavor, expected)
 
218
        self.assertThat(flavor, matchers.DictMatches(expected))
223
219
 
224
220
    def test_get_flavor_detail_with_limit(self):
225
221
        req = fakes.HTTPRequest.blank('/v2/fake/flavors/detail?limit=1')
251
247
        href_parts = urlparse.urlparse(response_links[0]['href'])
252
248
        self.assertEqual('/v2/fake/flavors', href_parts.path)
253
249
        params = urlparse.parse_qs(href_parts.query)
254
 
        self.assertDictMatch({'limit': ['1'], 'marker': ['1']}, params)
 
250
        self.assertThat({'limit': ['1'], 'marker': ['1']},
 
251
                        matchers.DictMatches(params))
255
252
 
256
253
    def test_get_flavor_with_limit(self):
257
254
        req = fakes.HTTPRequest.blank('/v2/fake/flavors?limit=2')
297
294
        href_parts = urlparse.urlparse(response_links[0]['href'])
298
295
        self.assertEqual('/v2/fake/flavors', href_parts.path)
299
296
        params = urlparse.parse_qs(href_parts.query)
300
 
        self.assertDictMatch({'limit': ['2'], 'marker': ['2']}, params)
 
297
        self.assertThat({'limit': ['2'], 'marker': ['2']},
 
298
                        matchers.DictMatches(params))
301
299
 
302
300
    def test_get_flavor_list_detail(self):
303
301
        req = fakes.HTTPRequest.blank('/v2/fake/flavors/detail')