def test_rebuild_accepted_minimum_pass_disabled(self):
        # run with enable_instance_password disabled to verify adminPass
        # is missing from response. See lp bug 921814
        self.flags(enable_instance_password=False)

        return_server = fakes.fake_instance_get(image_ref='2',
                vm_state=vm_states.ACTIVE, host='fake_host')
        self.stub_out('nova.db.instance_get_by_uuid', return_server)
        self_href = FAKE_UUID % 'http://localhost/v2/servers/%s'

        body = {
            "rebuild": {
                "imageRef": self._image_href,
            },
        }

        robj = self.controller._action_rebuild(self.req, FAKE_UUID, body=body)
        body = robj.obj

        self.assertEqual(body['server']['image']['id'], '2')
        self.assertNotIn("adminPass", body['server'])

        self.assertEqual(robj['location'], self_href)
dataset/ETHPy150Open openstack/nova/nova/tests/unit/api/openstack/compute/test_server_actions.py/ServerActionsControllerTestV21.test_rebuild_accepted_minimum_pass_disabled/swapped operands of `%`