@@ -0,0 +1,1513 @@
+# -*- coding: utf-8 -*-%0Afrom ChatExchange.chatexchange import events, client%0Afrom chatcommunicate import *%0A%0Areply_value = %22%22%0A%0A%0Adef mock_reply(text, length_check=True):%0A    global reply_value%0A    reply_value = text%0A%0A%0Adef mock_event(content, event_type, room_id, room_name, user_id, user_name, id=28258802, message_id=15249005, time_stamp=1398822427):%0A    event_data = %7B%0A        %22content%22: content,%0A        %22event_type%22: event_type,%0A        %22id%22: id,%0A        %22message_id%22: message_id,%0A        %22room_id%22: room_id,%0A        %22room_name%22: room_name,%0A        %22time_stamp%22: time_stamp,%0A        %22user_id%22: user_id,%0A        %22user_name%22: user_name%0A    %7D%0A%0A    event = events.make(event_data, client.Client())%0A    event.message.reply = mock_reply%0A    event.message.content_source = content%0A    return event%0A%0A%0Adef test_blame():%0A    # Get a suitable message%0A    blame_event = mock_event(%22!!/blame%22, 1, 11540, %22Charcoal HQ%22, 59776, u%22Doorknob %E5%86%B0%22)%0A    watcher(blame_event, client.Client())%0A    assert reply_value == u%22It's %5BDoorknob %E5%86%B0%5D(//chat.stackexchange.com/users/59776)'s fault.%22%0A%0A%0Adef test_coffee():%0A    # Get a suitable message%0A    blame_event = mock_event(%22!!/coffee%22, 1, 11540, %22Charcoal HQ%22, 59776, u%22Doorknob %E5%86%B0%22)%0A    watcher(blame_event, client.Client())%0A    assert u%22for @Doorknob%E5%86%B0%22 in reply_value%0A%0A%0Adef test_tea():%0A    # Get a suitable message%0A    blame_event = mock_event(%22!!/coffee%22, 1, 11540, %22Charcoal HQ%22, 59776, u%22Doorknob %E5%86%B0%22)%0A    watcher(blame_event, client.Client())%0A    assert u%22for @Doorknob%E5%86%B0%22 in reply_value%0A

Add tests for chatcommunicate