Example #1
0
def test_knows_what_is_your_name():
    assert process_query("what is your name") == "Ajith Dharwar"
Example #2
0
def test_is_case_insensitive():
    assert process_query("What is your NAME") == "Ajith Dharwar"
Example #3
0
def api():
    query = request.args.get('q')
    return process_query(query)
Example #4
0
def test_returns_empty_string_if_cannot_process_query():
    assert process_query("xxxx") == ""
Example #5
0
def test_is_case_insensitive():
    assert process_query("Who wrote romeo and JULIET") == "William Shakespeare"
Example #6
0
def test_knows_who_wrote_romeo_and_juliet():
    assert process_query("Who wrote Romeo and Juliet") == "William Shakespeare"
def test_returns_empty_string_if_cannot_process_query():
    assert process_query("xxxx") == "Hello, python world!"
def test_multiply():
    assert process_query("what is 2 multiplied by 3") == "6"
def test_largest():
    assert process_query("which : is largest : 101,102,103") == "103"