Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Commit

Permalink
fix pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
ricwo committed Nov 20, 2017
1 parent bb8b116 commit edd8516
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 6 additions & 3 deletions tests/test_processor.py
Expand Up @@ -15,7 +15,9 @@ def test_message_processor(default_processor):
assert ("default", "hey there Core!") == out.latest_output()


def test_logging_of_bot_utterances_on_tracker(default_processor, default_dispatcher, default_agent):
def test_logging_of_bot_utterances_on_tracker(default_processor,
default_dispatcher,
default_agent):
sender_id = "test_logging_of_bot_utterances_on_tracker"
tracker = default_agent.tracker_store.get_or_create_tracker(sender_id)
buttons = [
Expand All @@ -30,5 +32,6 @@ def test_logging_of_bot_utterances_on_tracker(default_processor, default_dispatc

assert len(default_dispatcher.latest_bot_messages) == 4

default_processor._log_bot_utterances_on_tracker(tracker, default_dispatcher)
assert not default_dispatcher.latest_bot_messages
default_processor._log_bot_utterances_on_tracker(tracker,
default_dispatcher)
assert not default_dispatcher.latest_bot_messages
5 changes: 3 additions & 2 deletions tests/test_trackers.py
Expand Up @@ -116,15 +116,16 @@ def test_tracker_state_regression_without_bot_utterance(default_agent):
expected = ("action_listen;"
"_greet;utter_greet;action_listen;"
"_greet;action_listen")
assert ";".join([e.as_story_string() for e in tracker.events if e.as_story_string()]) == expected
assert ";".join([e.as_story_string() for e in
tracker.events if e.as_story_string()]) == expected


def test_tracker_state_regression_with_bot_utterance(default_agent):
sender_id = "test_tracker_state_regression_with_bot_utterance"
for i in range(0, 2):
default_agent.handle_message("_greet", sender_id=sender_id)
tracker = default_agent.tracker_store.get_or_create_tracker(sender_id)

expected = ["action_listen", "_greet", None, "utter_greet",
"action_listen", "_greet", "action_listen"]
print([e.as_story_string() for e in tracker.events])
Expand Down

0 comments on commit edd8516

Please sign in to comment.