Skip to content

Commit

Permalink
Add test for gen_session_id.
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgestar committed Jul 26, 2016
1 parent 4eb3495 commit f1282f5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vumi/transports/mtn_nigeria/tests/test_xml_over_tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,3 +856,9 @@ def test_error_response_handling_for_unknown_codes(self):
'err',
"Server sent error message: (1337) Unknown Code: "
"Some Reason")

def test_gen_session_id(self):
sessid = XmlOverTcpClient.gen_session_id()
self.assertEqual(len(sessid), XmlOverTcpClient.SESSION_ID_HEADER_SIZE)
self.assertTrue(
all(c in XmlOverTcpClient.SESSION_ID_CHARACTERS for c in sessid))

0 comments on commit f1282f5

Please sign in to comment.