Revision 882c7e33 kamaki/clients/compute/test.py

b/kamaki/clients/compute/test.py
138 138
                success=success,
139 139
                **args[3]))
140 140

  
141
    @patch('%s.delete' % rest_pkg, return_value=FR())
142
    def test_servers_delete(self, delete):
143
        vm_id = vm_recv['server']['id']
144
        for args in product(
145
                ('', vm_id),
146
                ('', 'cmd'),
147
                (204, 208),
148
                ({}, {'k': 'v'})):
149
            (server_id, command, success, kwargs) = args
150
            self.client.servers_delete(*args[:3], **args[3])
151
            vm_str = '/%s' % server_id if server_id else ''
152
            cmd_str = '/%s' % command if command else ''
153
            self.assertEqual(delete.mock_calls[-1], call(
154
                '/servers%s%s' % (vm_str, cmd_str),
155
                success=success,
156
                **args[3]))
157

  
141 158

  
142 159
class Compute(TestCase):
143 160

  

Also available in: Unified diff