Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ActorContext breakage due to get_api_models #615

Merged
merged 1 commit into from
Mar 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion leapp/snactor/fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from leapp.compat import raise_with_traceback
from leapp.messaging.inprocess import InProcessMessaging
from leapp.repository.scan import find_and_scan_repositories
from leapp.utils import get_api_models
from leapp.utils.audit import Execution, get_connection
from leapp.utils.repository import find_repository_basedir

Expand Down Expand Up @@ -66,6 +67,8 @@ class ActorContext(object):
actors. It provides a set of methods that allow specifying input messages for the actor, executing the
actor and to retrieve messages sent by the actor.
"""
apis = ()

def __init__(self, actor=None):
self._actor = actor
self._messaging = InProcessMessaging()
Expand All @@ -80,7 +83,7 @@ def set_actor(self, actor):
"""
type(self).name = actor.name + '_feeder'
# Consumes is here what it actually produces because we want to consume produced messages in 'consume'
type(self).consumes = actor.produces
type(self).consumes = get_api_models(actor, 'produces')
self._actor = actor

def feed(self, *models):
Expand Down