Revision ca5528f1 kamaki/clients/compute/test.py

b/kamaki/clients/compute/test.py
703 703
        self.client.delete_image(img_ref)
704 704
        ID.assert_called_once_with(img_ref)
705 705

  
706
    @patch('%s.images_metadata_put' % compute_pkg, return_value=FR())
707
    def test_create_image_metadata(self, IP):
708
        (key, val) = ('k1', 'v1')
709
        FR.json = dict(meta=img_recv['image'])
710
        r = self.client.create_image_metadata(img_ref, key, val)
711
        IP.assert_called_once_with(
712
            img_ref, '%s' % key,
713
            json_data=dict(meta={key: val}))
714
        self.assert_dicts_are_equal(r, img_recv['image'])
706
    # @patch('%s.images_metadata_put' % compute_pkg, return_value=FR())
707
    # def test_create_image_metadata(self, IP):
708
    #     (key, val) = ('k1', 'v1')
709
    #     FR.json = dict(meta=img_recv['image'])
710
    #     r = self.client.create_image_metadata(img_ref, key, val)
711
    #     IP.assert_called_once_with(
712
    #         img_ref, '%s' % key,
713
    #         json_data=dict(meta={key: val}))
714
    #     self.assert_dicts_are_equal(r, img_recv['image'])
715 715

  
716 716
    @patch('%s.images_metadata_post' % compute_pkg, return_value=FR())
717 717
    def test_update_image_metadata(self, IP):

Also available in: Unified diff