~ubuntu-branches/ubuntu/vivid/ironic/vivid-updates

« back to all changes in this revision

Viewing changes to ironic/tests/test_disk_partitioner.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2015-03-30 11:14:57 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20150330111457-kr4ju3guf22m4vbz
Tags: 2015.1~b3-0ubuntu1
* New upstream release.
  + d/control: 
    - Align with upstream dependencies.
    - Add dh-python to build-dependencies.
    - Add psmisc as a dependency. (LP: #1358820)
  + d/p/fix-requirements.patch: Rediffed.
  + d/ironic-conductor.init.in: Fixed typos in LSB headers,
    thanks to JJ Asghar. (LP: #1429962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#    License for the specific language governing permissions and limitations
14
14
#    under the License.
15
15
 
16
 
import fixtures
 
16
import eventlet
17
17
import mock
18
18
from testtools.matchers import HasLength
19
19
 
23
23
from ironic.tests import base
24
24
 
25
25
 
 
26
@mock.patch.object(eventlet.greenthread, 'sleep', lambda seconds: None)
26
27
class DiskPartitionerTestCase(base.TestCase):
27
28
 
28
 
    def setUp(self):
29
 
        super(DiskPartitionerTestCase, self).setUp()
30
 
 
31
 
        def noop(*args, **kwargs):
32
 
            pass
33
 
 
34
 
        self.useFixture(fixtures.MonkeyPatch('eventlet.greenthread.sleep',
35
 
                                             noop))
36
 
 
37
29
    def test_add_partition(self):
38
30
        dp = disk_partitioner.DiskPartitioner('/dev/fake')
39
31
        dp.add_partition(1024)