Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

Make the bot flow testable using unit tests #95

Open
elinguiuriel opened this issue Aug 4, 2020 · 4 comments
Open

Make the bot flow testable using unit tests #95

elinguiuriel opened this issue Aug 4, 2020 · 4 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@elinguiuriel
Copy link
Contributor

Describe the bug

There is no way to test the bot flow because the object messenger is passed as an argument in

def send_start_messages(messenger):
    ....

def process_message(messenger, message):
    ....

def process_postback(messenger, payload):
    ...

These functions should always return a list containing the sequence of requests and actions to perform. We will be able to test the validity of the list in unit test.

@elinguiuriel elinguiuriel added bug Something isn't working enhancement New feature or request labels Aug 4, 2020
@elinguiuriel elinguiuriel changed the title The bot flow should be testable Make to bot flow testable using unit tests Aug 4, 2020
@elinguiuriel elinguiuriel changed the title Make to bot flow testable using unit tests Make the bot flow testable using unit tests Aug 4, 2020
@MohitPatni0731
Copy link

Can I take up this issue

@elinguiuriel
Copy link
Contributor Author

Can I take up this issue

@MohitPatni0731 please yourself 👍

@MohitPatni0731
Copy link

I am very new to programming and I've just learned basics of Python. Can you little bit help me solve this bug.

@elinguiuriel
Copy link
Contributor Author

I am very new to programming and I've just learned basics of Python. Can you little bit help me solve this bug.

This is an advanced issue, I am afraid it is not beginner friendy :-( !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants