Revision 2c987e80 kamaki/clients/test/cyclades.py

b/kamaki/clients/test/cyclades.py
377 377
                perform_req.call_args[0],
378 378
                ('post',  '{"shutdown": {}}', {}, {}))
379 379

  
380
    def test_start_server(self):
381
        vm_id = vm_recv['server']['id']
382
        self.FR.status_code = 202
383
        with patch.object(
384
                self.C,
385
                'perform_request',
386
                return_value=self.FR()) as perform_req:
387
            self.client.start_server(vm_id)
388
            self.assertEqual(self.client.http_client.url, self.url)
389
            self.assertEqual(
390
                self.client.http_client.path,
391
                '/servers/%s/action' % vm_id)
392
            self.assertEqual(
393
                perform_req.call_args[0],
394
                ('post',  '{"start": {}}', {}, {}))
395

  
380 396
    """
381 397
    def test_start_server(self):
382 398
        self.client.start_server(self.server1['id'])

Also available in: Unified diff