autobahn 0.3.1__zip

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. Python27/Lib/site-packages/autobahn/__init__.py +22 -0
  2. Python27/Lib/site-packages/autobahn/__init__.pyc +0 -0
  3. Python27/Lib/site-packages/autobahn/autobahn.py +76 -0
  4. Python27/Lib/site-packages/autobahn/autobahn.pyc +0 -0
  5. Python27/Lib/site-packages/autobahn/case/__init__.py +207 -0
  6. Python27/Lib/site-packages/autobahn/case/__init__.pyc +0 -0
  7. Python27/Lib/site-packages/autobahn/case/case.py +68 -0
  8. Python27/Lib/site-packages/autobahn/case/case.pyc +0 -0
  9. Python27/Lib/site-packages/autobahn/case/case1_1_1.py +31 -0
  10. Python27/Lib/site-packages/autobahn/case/case1_1_1.pyc +0 -0
  11. Python27/Lib/site-packages/autobahn/case/case1_1_2.py +31 -0
  12. Python27/Lib/site-packages/autobahn/case/case1_1_2.pyc +0 -0
  13. Python27/Lib/site-packages/autobahn/case/case1_1_3.py +31 -0
  14. Python27/Lib/site-packages/autobahn/case/case1_1_3.pyc +0 -0
  15. Python27/Lib/site-packages/autobahn/case/case1_1_4.py +31 -0
  16. Python27/Lib/site-packages/autobahn/case/case1_1_4.pyc +0 -0
  17. Python27/Lib/site-packages/autobahn/case/case1_1_5.py +31 -0
  18. Python27/Lib/site-packages/autobahn/case/case1_1_5.pyc +0 -0
  19. Python27/Lib/site-packages/autobahn/case/case1_1_6.py +31 -0
  20. Python27/Lib/site-packages/autobahn/case/case1_1_6.pyc +0 -0
  21. Python27/Lib/site-packages/autobahn/case/case1_1_7.py +31 -0
  22. Python27/Lib/site-packages/autobahn/case/case1_1_7.pyc +0 -0
  23. Python27/Lib/site-packages/autobahn/case/case1_1_8.py +31 -0
  24. Python27/Lib/site-packages/autobahn/case/case1_1_8.pyc +0 -0
  25. Python27/Lib/site-packages/autobahn/case/case1_2_1.py +31 -0
  26. Python27/Lib/site-packages/autobahn/case/case1_2_1.pyc +0 -0
  27. Python27/Lib/site-packages/autobahn/case/case1_2_2.py +31 -0
  28. Python27/Lib/site-packages/autobahn/case/case1_2_2.pyc +0 -0
  29. Python27/Lib/site-packages/autobahn/case/case1_2_3.py +31 -0
  30. Python27/Lib/site-packages/autobahn/case/case1_2_3.pyc +0 -0
  31. Python27/Lib/site-packages/autobahn/case/case1_2_4.py +31 -0
  32. Python27/Lib/site-packages/autobahn/case/case1_2_4.pyc +0 -0
  33. Python27/Lib/site-packages/autobahn/case/case1_2_5.py +31 -0
  34. Python27/Lib/site-packages/autobahn/case/case1_2_5.pyc +0 -0
  35. Python27/Lib/site-packages/autobahn/case/case1_2_6.py +31 -0
  36. Python27/Lib/site-packages/autobahn/case/case1_2_6.pyc +0 -0
  37. Python27/Lib/site-packages/autobahn/case/case1_2_7.py +31 -0
  38. Python27/Lib/site-packages/autobahn/case/case1_2_7.pyc +0 -0
  39. Python27/Lib/site-packages/autobahn/case/case1_2_8.py +31 -0
  40. Python27/Lib/site-packages/autobahn/case/case1_2_8.pyc +0 -0
  41. Python27/Lib/site-packages/autobahn/case/case2_1.py +30 -0
  42. Python27/Lib/site-packages/autobahn/case/case2_1.pyc +0 -0
  43. Python27/Lib/site-packages/autobahn/case/case2_10.py +37 -0
  44. Python27/Lib/site-packages/autobahn/case/case2_10.pyc +0 -0
  45. Python27/Lib/site-packages/autobahn/case/case2_11.py +28 -0
  46. Python27/Lib/site-packages/autobahn/case/case2_11.pyc +0 -0
  47. Python27/Lib/site-packages/autobahn/case/case2_2.py +31 -0
  48. Python27/Lib/site-packages/autobahn/case/case2_2.pyc +0 -0
  49. Python27/Lib/site-packages/autobahn/case/case2_3.py +31 -0
  50. Python27/Lib/site-packages/autobahn/case/case2_3.pyc +0 -0
  51. Python27/Lib/site-packages/autobahn/case/case2_4.py +31 -0
  52. Python27/Lib/site-packages/autobahn/case/case2_4.pyc +0 -0
  53. Python27/Lib/site-packages/autobahn/case/case2_5.py +31 -0
  54. Python27/Lib/site-packages/autobahn/case/case2_5.pyc +0 -0
  55. Python27/Lib/site-packages/autobahn/case/case2_6.py +31 -0
  56. Python27/Lib/site-packages/autobahn/case/case2_6.pyc +0 -0
  57. Python27/Lib/site-packages/autobahn/case/case2_7.py +30 -0
  58. Python27/Lib/site-packages/autobahn/case/case2_7.pyc +0 -0
  59. Python27/Lib/site-packages/autobahn/case/case2_8.py +30 -0
  60. Python27/Lib/site-packages/autobahn/case/case2_8.pyc +0 -0
  61. Python27/Lib/site-packages/autobahn/case/case2_9.py +32 -0
  62. Python27/Lib/site-packages/autobahn/case/case2_9.pyc +0 -0
  63. Python27/Lib/site-packages/autobahn/case/case3_1.py +30 -0
  64. Python27/Lib/site-packages/autobahn/case/case3_1.pyc +0 -0
  65. Python27/Lib/site-packages/autobahn/case/case3_2.py +34 -0
  66. Python27/Lib/site-packages/autobahn/case/case3_2.pyc +0 -0
  67. Python27/Lib/site-packages/autobahn/case/case3_3.py +34 -0
  68. Python27/Lib/site-packages/autobahn/case/case3_3.pyc +0 -0
  69. Python27/Lib/site-packages/autobahn/case/case3_4.py +34 -0
  70. Python27/Lib/site-packages/autobahn/case/case3_4.pyc +0 -0
  71. Python27/Lib/site-packages/autobahn/case/case3_5.py +31 -0
  72. Python27/Lib/site-packages/autobahn/case/case3_5.pyc +0 -0
  73. Python27/Lib/site-packages/autobahn/case/case3_6.py +31 -0
  74. Python27/Lib/site-packages/autobahn/case/case3_6.pyc +0 -0
  75. Python27/Lib/site-packages/autobahn/case/case3_7.py +30 -0
  76. Python27/Lib/site-packages/autobahn/case/case3_7.pyc +0 -0
  77. Python27/Lib/site-packages/autobahn/case/case4_1_1.py +30 -0
  78. Python27/Lib/site-packages/autobahn/case/case4_1_1.pyc +0 -0
  79. Python27/Lib/site-packages/autobahn/case/case4_1_2.py +30 -0
  80. Python27/Lib/site-packages/autobahn/case/case4_1_2.pyc +0 -0
  81. Python27/Lib/site-packages/autobahn/case/case4_1_3.py +34 -0
  82. Python27/Lib/site-packages/autobahn/case/case4_1_3.pyc +0 -0
  83. Python27/Lib/site-packages/autobahn/case/case4_1_4.py +34 -0
  84. Python27/Lib/site-packages/autobahn/case/case4_1_4.pyc +0 -0
  85. Python27/Lib/site-packages/autobahn/case/case4_1_5.py +34 -0
  86. Python27/Lib/site-packages/autobahn/case/case4_1_5.pyc +0 -0
  87. Python27/Lib/site-packages/autobahn/case/case4_2_1.py +30 -0
  88. Python27/Lib/site-packages/autobahn/case/case4_2_1.pyc +0 -0
  89. Python27/Lib/site-packages/autobahn/case/case4_2_2.py +30 -0
  90. Python27/Lib/site-packages/autobahn/case/case4_2_2.pyc +0 -0
  91. Python27/Lib/site-packages/autobahn/case/case4_2_3.py +34 -0
  92. Python27/Lib/site-packages/autobahn/case/case4_2_3.pyc +0 -0
  93. Python27/Lib/site-packages/autobahn/case/case4_2_4.py +34 -0
  94. Python27/Lib/site-packages/autobahn/case/case4_2_4.pyc +0 -0
  95. Python27/Lib/site-packages/autobahn/case/case4_2_5.py +34 -0
  96. Python27/Lib/site-packages/autobahn/case/case4_2_5.pyc +0 -0
  97. Python27/Lib/site-packages/autobahn/case/case5_1.py +31 -0
  98. Python27/Lib/site-packages/autobahn/case/case5_1.pyc +0 -0
  99. Python27/Lib/site-packages/autobahn/case/case5_10.py +31 -0
  100. Python27/Lib/site-packages/autobahn/case/case5_10.pyc +0 -0
  101. Python27/Lib/site-packages/autobahn/case/case5_11.py +31 -0
  102. Python27/Lib/site-packages/autobahn/case/case5_11.pyc +0 -0
  103. Python27/Lib/site-packages/autobahn/case/case5_12.py +31 -0
  104. Python27/Lib/site-packages/autobahn/case/case5_12.pyc +0 -0
  105. Python27/Lib/site-packages/autobahn/case/case5_13.py +31 -0
  106. Python27/Lib/site-packages/autobahn/case/case5_13.pyc +0 -0
  107. Python27/Lib/site-packages/autobahn/case/case5_14.py +31 -0
  108. Python27/Lib/site-packages/autobahn/case/case5_14.pyc +0 -0
  109. Python27/Lib/site-packages/autobahn/case/case5_15.py +35 -0
  110. Python27/Lib/site-packages/autobahn/case/case5_15.pyc +0 -0
  111. Python27/Lib/site-packages/autobahn/case/case5_16.py +33 -0
  112. Python27/Lib/site-packages/autobahn/case/case5_16.pyc +0 -0
  113. Python27/Lib/site-packages/autobahn/case/case5_17.py +33 -0
  114. Python27/Lib/site-packages/autobahn/case/case5_17.pyc +0 -0
  115. Python27/Lib/site-packages/autobahn/case/case5_18.py +31 -0
  116. Python27/Lib/site-packages/autobahn/case/case5_18.pyc +0 -0
  117. Python27/Lib/site-packages/autobahn/case/case5_19.py +56 -0
  118. Python27/Lib/site-packages/autobahn/case/case5_19.pyc +0 -0
  119. Python27/Lib/site-packages/autobahn/case/case5_2.py +31 -0
  120. Python27/Lib/site-packages/autobahn/case/case5_2.pyc +0 -0
  121. Python27/Lib/site-packages/autobahn/case/case5_20.py +31 -0
  122. Python27/Lib/site-packages/autobahn/case/case5_20.pyc +0 -0
  123. Python27/Lib/site-packages/autobahn/case/case5_3.py +32 -0
  124. Python27/Lib/site-packages/autobahn/case/case5_3.pyc +0 -0
  125. Python27/Lib/site-packages/autobahn/case/case5_4.py +32 -0
  126. Python27/Lib/site-packages/autobahn/case/case5_4.pyc +0 -0
  127. Python27/Lib/site-packages/autobahn/case/case5_5.py +32 -0
  128. Python27/Lib/site-packages/autobahn/case/case5_5.pyc +0 -0
  129. Python27/Lib/site-packages/autobahn/case/case5_6.py +34 -0
  130. Python27/Lib/site-packages/autobahn/case/case5_6.pyc +0 -0
  131. Python27/Lib/site-packages/autobahn/case/case5_7.py +34 -0
  132. Python27/Lib/site-packages/autobahn/case/case5_7.pyc +0 -0
  133. Python27/Lib/site-packages/autobahn/case/case5_8.py +34 -0
  134. Python27/Lib/site-packages/autobahn/case/case5_8.pyc +0 -0
  135. Python27/Lib/site-packages/autobahn/case/case5_9.py +31 -0
  136. Python27/Lib/site-packages/autobahn/case/case5_9.pyc +0 -0
  137. Python27/Lib/site-packages/autobahn/case/case6_1.py +30 -0
  138. Python27/Lib/site-packages/autobahn/case/case6_1.pyc +0 -0
  139. Python27/Lib/site-packages/autobahn/case/case6_2.py +32 -0
  140. Python27/Lib/site-packages/autobahn/case/case6_2.pyc +0 -0
  141. Python27/Lib/site-packages/autobahn/case/case6_3.py +33 -0
  142. Python27/Lib/site-packages/autobahn/case/case6_3.pyc +0 -0
  143. Python27/Lib/site-packages/autobahn/case/case9_1_1.py +54 -0
  144. Python27/Lib/site-packages/autobahn/case/case9_1_1.pyc +0 -0
  145. Python27/Lib/site-packages/autobahn/case/case9_1_2.py +31 -0
  146. Python27/Lib/site-packages/autobahn/case/case9_1_2.pyc +0 -0
  147. Python27/Lib/site-packages/autobahn/case/case9_1_3.py +31 -0
  148. Python27/Lib/site-packages/autobahn/case/case9_1_3.pyc +0 -0
  149. Python27/Lib/site-packages/autobahn/case/case9_1_4.py +31 -0
  150. Python27/Lib/site-packages/autobahn/case/case9_1_4.pyc +0 -0
  151. Python27/Lib/site-packages/autobahn/case/case9_1_5.py +31 -0
  152. Python27/Lib/site-packages/autobahn/case/case9_1_5.pyc +0 -0
  153. Python27/Lib/site-packages/autobahn/case/case9_1_6.py +31 -0
  154. Python27/Lib/site-packages/autobahn/case/case9_1_6.pyc +0 -0
  155. Python27/Lib/site-packages/autobahn/case/case9_2_1.py +54 -0
  156. Python27/Lib/site-packages/autobahn/case/case9_2_1.pyc +0 -0
  157. Python27/Lib/site-packages/autobahn/case/case9_2_2.py +31 -0
  158. Python27/Lib/site-packages/autobahn/case/case9_2_2.pyc +0 -0
  159. Python27/Lib/site-packages/autobahn/case/case9_2_3.py +31 -0
  160. Python27/Lib/site-packages/autobahn/case/case9_2_3.pyc +0 -0
  161. Python27/Lib/site-packages/autobahn/case/case9_2_4.py +31 -0
  162. Python27/Lib/site-packages/autobahn/case/case9_2_4.pyc +0 -0
  163. Python27/Lib/site-packages/autobahn/case/case9_2_5.py +31 -0
  164. Python27/Lib/site-packages/autobahn/case/case9_2_5.pyc +0 -0
  165. Python27/Lib/site-packages/autobahn/case/case9_2_6.py +31 -0
  166. Python27/Lib/site-packages/autobahn/case/case9_2_6.pyc +0 -0
  167. Python27/Lib/site-packages/autobahn/case/case9_3_1.py +55 -0
  168. Python27/Lib/site-packages/autobahn/case/case9_3_1.pyc +0 -0
  169. Python27/Lib/site-packages/autobahn/case/case9_3_2.py +32 -0
  170. Python27/Lib/site-packages/autobahn/case/case9_3_2.pyc +0 -0
  171. Python27/Lib/site-packages/autobahn/case/case9_3_3.py +32 -0
  172. Python27/Lib/site-packages/autobahn/case/case9_3_3.pyc +0 -0
  173. Python27/Lib/site-packages/autobahn/case/case9_3_4.py +32 -0
  174. Python27/Lib/site-packages/autobahn/case/case9_3_4.pyc +0 -0
  175. Python27/Lib/site-packages/autobahn/case/case9_3_5.py +32 -0
  176. Python27/Lib/site-packages/autobahn/case/case9_3_5.pyc +0 -0
  177. Python27/Lib/site-packages/autobahn/case/case9_3_6.py +32 -0
  178. Python27/Lib/site-packages/autobahn/case/case9_3_6.pyc +0 -0
  179. Python27/Lib/site-packages/autobahn/case/case9_3_7.py +32 -0
  180. Python27/Lib/site-packages/autobahn/case/case9_3_7.pyc +0 -0
  181. Python27/Lib/site-packages/autobahn/case/case9_3_8.py +32 -0
  182. Python27/Lib/site-packages/autobahn/case/case9_3_8.pyc +0 -0
  183. Python27/Lib/site-packages/autobahn/case/case9_3_9.py +32 -0
  184. Python27/Lib/site-packages/autobahn/case/case9_3_9.pyc +0 -0
  185. Python27/Lib/site-packages/autobahn/case/case9_4_1.py +55 -0
  186. Python27/Lib/site-packages/autobahn/case/case9_4_1.pyc +0 -0
  187. Python27/Lib/site-packages/autobahn/case/case9_4_2.py +32 -0
  188. Python27/Lib/site-packages/autobahn/case/case9_4_2.pyc +0 -0
  189. Python27/Lib/site-packages/autobahn/case/case9_4_3.py +32 -0
  190. Python27/Lib/site-packages/autobahn/case/case9_4_3.pyc +0 -0
  191. Python27/Lib/site-packages/autobahn/case/case9_4_4.py +32 -0
  192. Python27/Lib/site-packages/autobahn/case/case9_4_4.pyc +0 -0
  193. Python27/Lib/site-packages/autobahn/case/case9_4_5.py +32 -0
  194. Python27/Lib/site-packages/autobahn/case/case9_4_5.pyc +0 -0
  195. Python27/Lib/site-packages/autobahn/case/case9_4_6.py +32 -0
  196. Python27/Lib/site-packages/autobahn/case/case9_4_6.pyc +0 -0
  197. Python27/Lib/site-packages/autobahn/case/case9_4_7.py +32 -0
  198. Python27/Lib/site-packages/autobahn/case/case9_4_7.pyc +0 -0
  199. Python27/Lib/site-packages/autobahn/case/case9_4_8.py +32 -0
  200. Python27/Lib/site-packages/autobahn/case/case9_4_8.pyc +0 -0
  201. Python27/Lib/site-packages/autobahn/case/case9_4_9.py +32 -0
  202. Python27/Lib/site-packages/autobahn/case/case9_4_9.pyc +0 -0
  203. Python27/Lib/site-packages/autobahn/case/case9_5_1.py +58 -0
  204. Python27/Lib/site-packages/autobahn/case/case9_5_1.pyc +0 -0
  205. Python27/Lib/site-packages/autobahn/case/case9_5_2.py +28 -0
  206. Python27/Lib/site-packages/autobahn/case/case9_5_2.pyc +0 -0
  207. Python27/Lib/site-packages/autobahn/case/case9_5_3.py +28 -0
  208. Python27/Lib/site-packages/autobahn/case/case9_5_3.pyc +0 -0
  209. Python27/Lib/site-packages/autobahn/case/case9_5_4.py +28 -0
  210. Python27/Lib/site-packages/autobahn/case/case9_5_4.pyc +0 -0
  211. Python27/Lib/site-packages/autobahn/case/case9_5_5.py +28 -0
  212. Python27/Lib/site-packages/autobahn/case/case9_5_5.pyc +0 -0
  213. Python27/Lib/site-packages/autobahn/case/case9_5_6.py +28 -0
  214. Python27/Lib/site-packages/autobahn/case/case9_5_6.pyc +0 -0
  215. Python27/Lib/site-packages/autobahn/case/case9_6_1.py +58 -0
  216. Python27/Lib/site-packages/autobahn/case/case9_6_1.pyc +0 -0
  217. Python27/Lib/site-packages/autobahn/case/case9_6_2.py +28 -0
  218. Python27/Lib/site-packages/autobahn/case/case9_6_2.pyc +0 -0
  219. Python27/Lib/site-packages/autobahn/case/case9_6_3.py +28 -0
  220. Python27/Lib/site-packages/autobahn/case/case9_6_3.pyc +0 -0
  221. Python27/Lib/site-packages/autobahn/case/case9_6_4.py +28 -0
  222. Python27/Lib/site-packages/autobahn/case/case9_6_4.pyc +0 -0
  223. Python27/Lib/site-packages/autobahn/case/case9_6_5.py +28 -0
  224. Python27/Lib/site-packages/autobahn/case/case9_6_5.pyc +0 -0
  225. Python27/Lib/site-packages/autobahn/case/case9_6_6.py +28 -0
  226. Python27/Lib/site-packages/autobahn/case/case9_6_6.pyc +0 -0
  227. Python27/Lib/site-packages/autobahn/fuzzing.py +911 -0
  228. Python27/Lib/site-packages/autobahn/fuzzing.pyc +0 -0
  229. Python27/Lib/site-packages/autobahn/websocket.py +1505 -0
  230. Python27/Lib/site-packages/autobahn/websocket.pyc +0 -0
  231. Python27/Lib/site-packages/autobahn-0.3.1-py2.7.egg-info/PKG-INFO +10 -0
  232. Python27/Lib/site-packages/autobahn-0.3.1-py2.7.egg-info/SOURCES.txt +124 -0
  233. Python27/Lib/site-packages/autobahn-0.3.1-py2.7.egg-info/dependency_links.txt +1 -0
  234. Python27/Lib/site-packages/autobahn-0.3.1-py2.7.egg-info/not-zip-safe +1 -0
  235. Python27/Lib/site-packages/autobahn-0.3.1-py2.7.egg-info/requires.txt +1 -0
  236. Python27/Lib/site-packages/autobahn-0.3.1-py2.7.egg-info/top_level.txt +1 -0
@@ -0,0 +1,34 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case import Case
20
+
21
+ class Case5_8(Case):
22
+
23
+ DESCRIPTION = """Send text Message fragmented into 2 fragments, one ping with payload in-between. Octets are sent in octet-wise chops."""
24
+
25
+ EXPECTATION = """A pong is received, then the message is echo'ed back to us."""
26
+
27
+ def onOpen(self):
28
+ ping_payload = "ping payload"
29
+ fragments = ["fragment1", "fragment2"]
30
+ self.expected[Case.OK] = [("pong", ping_payload), ("message", ''.join(fragments), False), ("failedByMe", True)]
31
+ self.p.sendFrame(opcode = 1, fin = False, payload = fragments[0], chopsize = 1)
32
+ self.p.sendFrame(opcode = 9, fin = True, payload = ping_payload, chopsize = 1)
33
+ self.p.sendFrame(opcode = 0, fin = True, payload = fragments[1], chopsize = 1)
34
+ self.p.killAfter(1)
@@ -0,0 +1,31 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case import Case
20
+
21
+ class Case5_9(Case):
22
+
23
+ DESCRIPTION = """Send unfragmented Text Message after Continuation Frame with FIN = true, where there is nothing to continue, sent in one chop."""
24
+
25
+ EXPECTATION = """The connection is failed immediately, since there is no message to continue."""
26
+
27
+ def onOpen(self):
28
+ self.expected[Case.OK] = [("failedByMe", False)]
29
+ self.p.sendFrame(opcode = 0, fin = True, payload = "non-continuation payload")
30
+ self.p.sendFrame(opcode = 1, fin = True, payload = "Hello, world!")
31
+ self.p.killAfter(1)
@@ -0,0 +1,30 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case import Case
20
+
21
+ class Case6_1(Case):
22
+
23
+ DESCRIPTION = """Send text message of length 0."""
24
+
25
+ EXPECTATION = """A message is echo'ed back to us (with empty payload)."""
26
+
27
+ def onOpen(self):
28
+ self.expected[Case.OK] = [("message", "", False), ("failedByMe", True)]
29
+ self.p.sendFrame(opcode = 1, payload = "")
30
+ self.p.killAfter(1)
@@ -0,0 +1,32 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case import Case
20
+
21
+ class Case6_2(Case):
22
+
23
+ DESCRIPTION = """Send fragmented text message, 3 fragments each of length 0."""
24
+
25
+ EXPECTATION = """A message is echo'ed back to us (with empty payload)."""
26
+
27
+ def onOpen(self):
28
+ self.expected[Case.OK] = [("message", "", False), ("failedByMe", True)]
29
+ self.p.sendFrame(opcode = 1, fin = False, payload = "")
30
+ self.p.sendFrame(opcode = 0, fin = False, payload = "")
31
+ self.p.sendFrame(opcode = 0, fin = True, payload = "")
32
+ self.p.killAfter(1)
@@ -0,0 +1,33 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case import Case
20
+
21
+ class Case6_3(Case):
22
+
23
+ DESCRIPTION = """Send fragmented text message, 3 fragments, first and last of length 0, middle non-empty."""
24
+
25
+ EXPECTATION = """A message is echo'ed back to us (with payload = payload of middle fragment)."""
26
+
27
+ def onOpen(self):
28
+ payload = "middle frame payload"
29
+ self.expected[Case.OK] = [("message", payload, False), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 1, fin = False, payload = "")
31
+ self.p.sendFrame(opcode = 0, fin = False, payload = payload)
32
+ self.p.sendFrame(opcode = 0, fin = True, payload = "")
33
+ self.p.killAfter(1)
@@ -0,0 +1,54 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case import Case
20
+
21
+ class Case9_1_1(Case):
22
+
23
+ DESCRIPTION = """Send text message message with payload of length 64 * 2**10 (64k)."""
24
+
25
+ EXPECTATION = """Receive echo'ed text message (with payload as sent)."""
26
+
27
+ def init(self):
28
+ self.DATALEN = 64 * 2**10
29
+ self.PAYLOAD = "BAsd7&jh23"
30
+ self.WAITSECS = 10
31
+ self.reportTime = True
32
+
33
+ def onOpen(self):
34
+ self.p.createWirelog = False
35
+ self.behavior = Case.FAILED
36
+ self.result = "Did not receive message within %d seconds." % self.WAITSECS
37
+ self.p.sendFrame(opcode = 1, payload = self.PAYLOAD, payload_len = self.DATALEN)
38
+ self.p.killAfter(self.WAITSECS)
39
+
40
+ def onMessage(self, msg, binary):
41
+ if binary:
42
+ self.result = "Expected text message with payload, but got binary."
43
+ else:
44
+ if len(msg) != self.DATALEN:
45
+ self.result = "Expected text message with payload of length %d, but got %d." % (self.DATALEN, len(msg))
46
+ else:
47
+ ## FIXME : check actual content
48
+ ##
49
+ self.behavior = Case.OK
50
+ self.result = "Received text message of length %d." % len(msg)
51
+ self.p.failConnection()
52
+
53
+ def onConnectionLost(self, failedByMe):
54
+ pass
@@ -0,0 +1,31 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case9_1_1 import *
20
+
21
+ class Case9_1_2(Case9_1_1):
22
+
23
+ DESCRIPTION = """Send text message message with payload of length 256 * 2**10 (256k)."""
24
+
25
+ EXPECTATION = """Receive echo'ed text message (with payload as sent)."""
26
+
27
+ def init(self):
28
+ self.DATALEN = 256 * 2**10
29
+ self.PAYLOAD = "BAsd7&jh23"
30
+ self.WAITSECS = 10
31
+ self.reportTime = True
@@ -0,0 +1,31 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case9_1_1 import *
20
+
21
+ class Case9_1_3(Case9_1_1):
22
+
23
+ DESCRIPTION = """Send text message message with payload of length 1 * 2**20 (1M)."""
24
+
25
+ EXPECTATION = """Receive echo'ed text message (with payload as sent)."""
26
+
27
+ def init(self):
28
+ self.DATALEN = 1 * 2**20
29
+ self.PAYLOAD = "BAsd7&jh23"
30
+ self.WAITSECS = 10
31
+ self.reportTime = True
@@ -0,0 +1,31 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case9_1_1 import *
20
+
21
+ class Case9_1_4(Case9_1_1):
22
+
23
+ DESCRIPTION = """Send text message message with payload of length 4 * 2**20 (4M)."""
24
+
25
+ EXPECTATION = """Receive echo'ed text message (with payload as sent)."""
26
+
27
+ def init(self):
28
+ self.DATALEN = 4 * 2**20
29
+ self.PAYLOAD = "BAsd7&jh23"
30
+ self.WAITSECS = 10
31
+ self.reportTime = True
@@ -0,0 +1,31 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case9_1_1 import *
20
+
21
+ class Case9_1_5(Case9_1_1):
22
+
23
+ DESCRIPTION = """Send text message message with payload of length 8 * 2**20 (8M)."""
24
+
25
+ EXPECTATION = """Receive echo'ed text message (with payload as sent)."""
26
+
27
+ def init(self):
28
+ self.DATALEN = 8 * 2**20
29
+ self.PAYLOAD = "BAsd7&jh23"
30
+ self.WAITSECS = 100
31
+ self.reportTime = True
@@ -0,0 +1,31 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case9_1_1 import *
20
+
21
+ class Case9_1_6(Case9_1_1):
22
+
23
+ DESCRIPTION = """Send text message message with payload of length 16 * 2**20 (16M)."""
24
+
25
+ EXPECTATION = """Receive echo'ed text message (with payload as sent)."""
26
+
27
+ def init(self):
28
+ self.DATALEN = 16 * 2**20
29
+ self.PAYLOAD = "BAsd7&jh23"
30
+ self.WAITSECS = 100
31
+ self.reportTime = True
@@ -0,0 +1,54 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case import Case
20
+
21
+ class Case9_2_1(Case):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 64 * 2**10 (64k)."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def init(self):
28
+ self.DATALEN = 64 * 2**10
29
+ self.PAYLOAD = "\x00\xfe\x23\xfa\xf0"
30
+ self.WAITSECS = 10
31
+ self.reportTime = True
32
+
33
+ def onOpen(self):
34
+ self.p.createWirelog = False
35
+ self.behavior = Case.FAILED
36
+ self.result = "Did not receive message within %d seconds." % self.WAITSECS
37
+ self.p.sendFrame(opcode = 2, payload = self.PAYLOAD, payload_len = self.DATALEN)
38
+ self.p.killAfter(self.WAITSECS)
39
+
40
+ def onMessage(self, msg, binary):
41
+ if not binary:
42
+ self.result = "Expected binary message with payload, but got text."
43
+ else:
44
+ if len(msg) != self.DATALEN:
45
+ self.result = "Expected binary message with payload of length %d, but got %d." % (self.DATALEN, len(msg))
46
+ else:
47
+ ## FIXME : check actual content
48
+ ##
49
+ self.behavior = Case.OK
50
+ self.result = "Received binary message of length %d." % len(msg)
51
+ self.p.failConnection()
52
+
53
+ def onConnectionLost(self, failedByMe):
54
+ pass
@@ -0,0 +1,31 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case9_2_1 import *
20
+
21
+ class Case9_2_2(Case9_2_1):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 256 * 2**10 (256k)."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def init(self):
28
+ self.DATALEN = 256 * 2**10
29
+ self.PAYLOAD = "\x00\xfe\x23\xfa\xf0"
30
+ self.WAITSECS = 10
31
+ self.reportTime = True
@@ -0,0 +1,31 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case9_2_1 import *
20
+
21
+ class Case9_2_3(Case9_2_1):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 1 * 2**20 (1M)."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def init(self):
28
+ self.DATALEN = 1 * 2**20
29
+ self.PAYLOAD = "\x00\xfe\x23\xfa\xf0"
30
+ self.WAITSECS = 10
31
+ self.reportTime = True
@@ -0,0 +1,31 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case9_2_1 import *
20
+
21
+ class Case9_2_4(Case9_2_1):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 4 * 2**20 (4M)."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def init(self):
28
+ self.DATALEN = 4 * 2**20
29
+ self.PAYLOAD = "\x00\xfe\x23\xfa\xf0"
30
+ self.WAITSECS = 10
31
+ self.reportTime = True
@@ -0,0 +1,31 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case9_2_1 import *
20
+
21
+ class Case9_2_5(Case9_2_1):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 8 * 2**20 (16M)."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def init(self):
28
+ self.DATALEN = 8 * 2**20
29
+ self.PAYLOAD = "\x00\xfe\x23\xfa\xf0"
30
+ self.WAITSECS = 100
31
+ self.reportTime = True
@@ -0,0 +1,31 @@
1
+ ###############################################################################
2
+ ##
3
+ ## Copyright 2011 Tavendo GmbH
4
+ ##
5
+ ## Licensed under the Apache License, Version 2.0 (the "License");
6
+ ## you may not use this file except in compliance with the License.
7
+ ## You may obtain a copy of the License at
8
+ ##
9
+ ## http://www.apache.org/licenses/LICENSE-2.0
10
+ ##
11
+ ## Unless required by applicable law or agreed to in writing, software
12
+ ## distributed under the License is distributed on an "AS IS" BASIS,
13
+ ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ ## See the License for the specific language governing permissions and
15
+ ## limitations under the License.
16
+ ##
17
+ ###############################################################################
18
+
19
+ from case9_2_1 import *
20
+
21
+ class Case9_2_6(Case9_2_1):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 16 * 2**20 (16M)."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def init(self):
28
+ self.DATALEN = 16 * 2**20
29
+ self.PAYLOAD = "\x00\xfe\x23\xfa\xf0"
30
+ self.WAITSECS = 100
31
+ self.reportTime = True