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

« back to all changes in this revision

Viewing changes to ironic/tests/api/v1/test_types.py

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-01-05 12:21:37 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20150105122137-171bqrdpcxqipunk
Tags: 2015.1~b1-0ubuntu1
* New upstream beta release:
  - d/control: Align version requirements with upstream release.
* d/watch: Update uversionmangle to deal with kilo beta versioning
  changes.
* d/control: Bumped Standards-Version to 3.9.6, no changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from ironic.api.controllers.v1 import types
24
24
from ironic.common import exception
25
25
from ironic.common import utils
26
 
from ironic.tests.api import base
27
 
 
28
 
 
29
 
class TestMacAddressType(base.FunctionalTest):
 
26
from ironic.tests import base
 
27
 
 
28
 
 
29
class TestMacAddressType(base.TestCase):
30
30
 
31
31
    def test_valid_mac_addr(self):
32
32
        test_mac = 'aa:bb:cc:11:22:33'
39
39
                          types.MacAddressType.validate, 'invalid-mac')
40
40
 
41
41
 
42
 
class TestUuidType(base.FunctionalTest):
 
42
class TestUuidType(base.TestCase):
43
43
 
44
44
    def test_valid_uuid(self):
45
45
        test_uuid = '1a1a1a1a-2b2b-3c3c-4d4d-5e5e5e5e5e5e'
73
73
        return patch
74
74
 
75
75
 
76
 
class TestJsonPatchType(base.FunctionalTest):
 
76
class TestJsonPatchType(base.TestCase):
77
77
 
78
78
    def setUp(self):
79
79
        super(TestJsonPatchType, self).setUp()
147
147
        self.assertTrue(ret.json['faultstring'])
148
148
 
149
149
 
150
 
class TestMultiType(base.FunctionalTest):
 
150
class TestMultiType(base.TestCase):
151
151
 
152
152
    def test_valid_values(self):
153
153
        vt = types.MultiType(wsme.types.text, six.integer_types)
168
168
        self.assertIn(str(int), vts)
169
169
 
170
170
 
171
 
class TestBooleanType(base.FunctionalTest):
 
171
class TestBooleanType(base.TestCase):
172
172
 
173
173
    def test_valid_true_values(self):
174
174
        v = types.BooleanType()