Download this file

react_tests.py    36 lines (30 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from nose.tools import *
from lamson.testing import *
import os
from lamson import server
relay = relay(port=8823)
client = RouterConversation("queuetester@localhost", "requests_tests")
confirm_format = "testing-confirm-[0-9]+@"
noreply_format = "testing-noreply@"
host = "localhost"
def test_react_for_existing_project():
"""
Then make sure that project react messages for existing project queued properly.
"""
dest_addr = "wiki.Beta@test.projects.%s" % host
client.begin()
client.say(dest_addr, "Test project react messages for existing project queued properly")
def test_react_for_bad_project():
"""
Then make sure that project react messages for non-existing project dropped properly.
"""
dest_addr = "wiki.Beta@badproject.projects.%s" % host
client.begin()
client.say(dest_addr, "Test project react messages for non-existing project dropped properly")
def test_react_for_user_project():
"""
Then make sure that project react messages for existing user queued properly.
"""
dest_addr = "wiki.Beta@test_user2.users.%s" % host
client.begin()
client.say(dest_addr, "Test project react messages for existing user queued properly")