fbdevelopercircles / open-source-edu-bot

Open Source Education bot, built by the Developer Circles community.
MIT License
59 stars 79 forks source link

Make the bot flow testable using unit tests #95

Open elinguiuriel opened 3 years ago

elinguiuriel commented 3 years ago

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.

MohitPatni0731 commented 3 years ago

Can I take up this issue

elinguiuriel commented 3 years ago

Can I take up this issue

@MohitPatni0731 please yourself 👍

MohitPatni0731 commented 3 years ago

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

elinguiuriel commented 3 years ago

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 :-( !