Revision aa9c7402 kamaki/clients/pithos/test.py

b/kamaki/clients/pithos/test.py
336 336
        for arg, val in kwargs.items():
337 337
            self.assertEqual(OP.mock_calls[-2][2][arg], val)
338 338

  
339
    @patch('%s.put' % pithos_pkg, return_value=FR())
340
    @patch('%s.set_header' % client_pkg)
341
    def test_create_directory(self, SH, put):
342
        cont = self.client.container
343
        exp_shd = [
344
            call('Content-Type', 'application/directory'),
345
            call('Content-length', '0')]
346
        exp_put = [call('/%s/%s/%s' % (user_id, cont, obj), success=201)]
347
        self.client.create_directory(obj)
348
        self.assertEqual(PC.set_header.mock_calls, exp_shd)
349
        self.assertEqual(put.mock_calls, exp_put)
350

  
351 339
    def test_get_object_info(self):
352 340
        FR.headers = object_info
353 341
        version = 'v3r510n'
......
359 347
                call(obj, version=None),
360 348
                call(obj, version=version)])
361 349
        with patch.object(
362
                PC,
363
                'object_head',
350
                PC, 'object_head',
364 351
                side_effect=ClientError('Obj not found', 404)):
365 352
            self.assertRaises(
366 353
                ClientError,

Also available in: Unified diff