'Test case when check_create_complete should return True.
check_create_complete should return True create task is
done and the nested stack is in (<action>,COMPLETE) state.'

def test_state_ok(self):

    self.mock_lock = self.patchobject(stack_lock.StackLock, 'get_engine_id')
    self.mock_lock.return_value = None
    self.status[1] = 'COMPLETE'
    complete = getattr(self.parent_resource, ('check_%s_complete' % self.action))
    self.assertIs(True, complete(None))
    self.mock_status.assert_called_once_with(self.parent_resource.context, self.parent_resource.resource_id)
    self.mock_lock.assert_called_once_with(self.parent_resource.context, self.parent_resource.resource_id)
