'Confirm evacuate scenario updates vm_state to stopped
if instance is in stopped state'

def test_rebuild_with_instance_in_stopped_state(self):

    db.instance_update(self.context, self.inst.uuid, {'vm_state': vm_states.STOPPED})
    self.inst.vm_state = vm_states.STOPPED
    self.stub_out('nova.virt.fake.FakeDriver.instance_on_disk', (lambda *a, **ka: True))
    self._rebuild(vm_states_is_stopped=True)
    instance = db.instance_get(self.context, self.inst.id)
    self.assertEqual(instance['vm_state'], vm_states.STOPPED)
