Skip to content

Commit

Permalink
add test for event type
Browse files Browse the repository at this point in the history
  • Loading branch information
VeryCB authored and lepture committed Feb 25, 2014
1 parent f6e9685 commit 33b5dd4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test_weixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,21 @@ def test_post_link(self):
rv = self.client.post(signature_url, data=text)
assert rv.status_code == 200

def test_post_event(self):
'''
<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>1351776360</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[subscribe]]></Event>
<MsgId>1234567890123456</MsgId>
</xml>
'''
text = self.test_post_event.__doc__
rv = self.client.post(signature_url, data=text)
assert rv.status_code == 200

def test_post_no_type(self):
'''
<xml>
Expand Down

0 comments on commit 33b5dd4

Please sign in to comment.