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

« back to all changes in this revision

Viewing changes to nova/tests/api/openstack/volume/test_volumes.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:
42
42
        self.stubs.Set(volume_api.API, 'get', fakes.stub_volume_get)
43
43
        self.stubs.Set(volume_api.API, 'delete', fakes.stub_volume_delete)
44
44
 
45
 
    def _do_test_volume_create(self, size):
 
45
    def test_volume_create(self):
46
46
        self.stubs.Set(volume_api.API, "create", fakes.stub_volume_create)
47
47
 
48
 
        vol = {"size": size,
 
48
        vol = {"size": 100,
49
49
               "display_name": "Volume Test Name",
50
50
               "display_description": "Volume Test Desc",
51
51
               "availability_zone": "zone1:host1"}
71
71
        self.assertEqual(res.code, 200)
72
72
        self.assertTrue('location' in res.headers)
73
73
 
74
 
    def test_volume_create_int_size(self):
75
 
        self._do_test_volume_create(100)
76
 
 
77
 
    def test_volume_create_str_size(self):
78
 
        self._do_test_volume_create('100')
79
 
 
80
74
    def test_volume_creation_fails_with_bad_size(self):
81
75
        vol = {"size": '',
82
76
               "display_name": "Volume Test Name",