def test_add(self):
     bm_client = mock.Mock()
     node = mock.Mock(uuid='uuid1', properties={})
     new_caps = utils.node_add_capabilities(bm_client, node, x='y')
     bm_client.node.update.assert_called_once_with(
         'uuid1', [{'op': 'add', 'path': '/properties/capabilities',
                    'value': 'x:y'}])
     self.assertEqual('x:y', node.properties['capabilities'])
     self.assertEqual({'x': 'y'}, new_caps)
 def test_add(self):
     bm_client = mock.Mock()
     node = mock.Mock(uuid='uuid1', properties={})
     new_caps = utils.node_add_capabilities(bm_client, node, x='y')
     bm_client.node.update.assert_called_once_with(
         'uuid1', [{'op': 'add', 'path': '/properties/capabilities',
                    'value': 'x:y'}])
     self.assertEqual('x:y', node.properties['capabilities'])
     self.assertEqual({'x': 'y'}, new_caps)