Revision d8abe9e6 kamaki/clients/test/cyclades.py

b/kamaki/clients/test/cyclades.py
654 654
                self.assert_dicts_are_equal(r, img_recv['image'])
655 655

  
656 656
    def test_update_image_metadata(self):
657
        img_ref = img_recv['image']['id']
658 657
        metadata = dict(m1='v1', m2='v2', m3='v3')
659 658
        self.FR.json = dict(metadata=metadata)
660 659
        with patch.object(
......
669 668
            data = images_post.call_args[1]['json_data']
670 669
            self.assert_dicts_are_equal(data, dict(metadata=metadata))
671 670

  
672
    """
673 671
    def test_delete_image_metadata(self):
674
        self.client.create_image_metadata(self.img, 'mykey1', 'myval1')
675
        self.client.delete_image_metadata(self.img, 'mykey1')
676
        r = self.client.get_image_metadata(self.img)
677
        self.assertNotEqual('mykey1' in r)
678
    """
672
        key = 'metakey'
673
        with patch.object(
674
                CycladesClientApi,
675
                'images_delete',
676
                return_value=self.FR()) as images_delete:
677
            self.client.delete_image_metadata(img_ref, key)
678
            self.assertEqual(
679
                (img_ref, '/meta/' + key),
680
                images_delete.call_args[0])

Also available in: Unified diff