Revision 6af47576 kamaki/clients/compute/test.py

b/kamaki/clients/compute/test.py
206 206
                data=json_data, success=success,
207 207
                **kwargs))
208 208

  
209
    @patch('%s.get' % rest_pkg, return_value=FR())
210
    def test_flavors_get(self, get):
211
        vm_id = vm_recv['server']['id']
212
        for args in product(
213
                ('', vm_id),
214
                ('', 'cmd'),
215
                (200, 204),
216
                ({}, {'k': 'v'})):
217
            (server_id, command, success, kwargs) = args
218
            self.client.flavors_get(*args[:3], **kwargs)
219
            vm_str = '/%s' % server_id if server_id else ''
220
            cmd_str = '/%s' % command if command else ''
221
            self.assertEqual(get.mock_calls[-1], call(
222
                '/flavors%s%s' % (vm_str, cmd_str),
223
                success=success,
224
                **kwargs))
225

  
209 226

  
210 227
class Compute(TestCase):
211 228

  

Also available in: Unified diff