Example #1
0
def test_arbitrary_response():
    print("Testing generate_arbitrary_response() functionality...")
    chatbot = Chatbot(True)

    if assertEquals(
        chatbot.generate_arbitrary_response('Can you tell me a story?'),
        "I'm not sure, but I probably can't tell you a story.",
        "Incorrect output for generate_arbitrary_response('Can you tell me a story?')"
    ) and assertEquals(
        chatbot.generate_arbitrary_response('Did you fart really loudly?'),
        "I'm not sure, but I probably didn't fart really loudly.",
        "Incorrect output for generate_arbitrary_response('Did you fart really loudly?')"
    ) and assertEquals(
        chatbot.generate_arbitrary_response('Who is the best actor?'),
        "I don't know who the best actor is.",
        "Incorrect output for generate_arbitrary_response('Who is the best actor?')"
    ):
        print('generate_arbitary_response() sanity check passed!')