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,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 Case1_2_1(Case):
22
+
23
+ DESCRIPTION = """Send binary message with payload 0."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with empty payload)."""
26
+
27
+ def onOpen(self):
28
+ payload = ""
29
+ self.expected[Case.OK] = [("message", payload, True), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 2, payload = payload)
31
+ 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 Case1_2_2(Case):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 125."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def onOpen(self):
28
+ payload = "\xfe" * 125
29
+ self.expected[Case.OK] = [("message", payload, True), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 2, payload = payload)
31
+ 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 Case1_2_3(Case):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 126."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def onOpen(self):
28
+ payload = "\xfe" * 126
29
+ self.expected[Case.OK] = [("message", payload, True), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 2, payload = payload)
31
+ 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 Case1_2_4(Case):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 127."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def onOpen(self):
28
+ payload = "\xfe" * 127
29
+ self.expected[Case.OK] = [("message", payload, True), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 2, payload = payload)
31
+ 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 Case1_2_5(Case):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 128."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def onOpen(self):
28
+ payload = "\xfe" * 128
29
+ self.expected[Case.OK] = [("message", payload, True), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 2, payload = payload)
31
+ 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 Case1_2_6(Case):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 65536."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def onOpen(self):
28
+ payload = "\xfe" * 65536
29
+ self.expected[Case.OK] = [("message", payload, True), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 2, payload = payload)
31
+ 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 Case1_2_7(Case):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 65537."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def onOpen(self):
28
+ payload = "\xfe" * 65537
29
+ self.expected[Case.OK] = [("message", payload, True), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 2, payload = payload)
31
+ 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 Case1_2_8(Case):
22
+
23
+ DESCRIPTION = """Send binary message message with payload of length 65537. Sent out data in chops of 997 octets."""
24
+
25
+ EXPECTATION = """Receive echo'ed binary message (with payload as sent)."""
26
+
27
+ def onOpen(self):
28
+ payload = "\xfe" * 65537
29
+ self.expected[Case.OK] = [("message", payload, True), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 2, payload = payload, chopsize = 997)
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 Case2_1(Case):
22
+
23
+ DESCRIPTION = """Send ping without payload."""
24
+
25
+ EXPECTATION = """Pong (with empty payload) is sent in reply to Ping."""
26
+
27
+ def onOpen(self):
28
+ self.expected[Case.OK] = [("pong", ""), ("failedByMe", True)]
29
+ self.p.sendFrame(opcode = 9)
30
+ self.p.killAfter(1)
@@ -0,0 +1,37 @@
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 Case2_10(Case):
22
+
23
+ DESCRIPTION = """Send 10 Pings with payload."""
24
+
25
+ EXPECTATION = """Pongs for our Pings with all the payloads. Note: This is not required by the Spec .. but we check for this behaviour anyway."""
26
+
27
+ def init(self):
28
+ self.chopsize = None
29
+
30
+ def onOpen(self):
31
+ self.expected[Case.OK] = []
32
+ for i in range(1, 10):
33
+ payload = "payload-%d" % i
34
+ self.expected[Case.OK].append(("pong", payload))
35
+ self.p.sendFrame(opcode = 9, payload = payload, chopsize = self.chopsize)
36
+ self.expected[Case.OK].append(("failedByMe", True))
37
+ self.p.killAfter(1)
@@ -0,0 +1,28 @@
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 case2_10 import *
20
+
21
+ class Case2_11(Case2_10):
22
+
23
+ DESCRIPTION = """Send 10 Pings with payload. Send out octets in octet-wise chops."""
24
+
25
+ EXPECTATION = """Pongs for our Pings with all the payloads. Note: This is not required by the Spec .. but we check for this behaviour anyway."""
26
+
27
+ def init(self):
28
+ self.chopsize = 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 Case2_2(Case):
22
+
23
+ DESCRIPTION = """Send ping with small text payload."""
24
+
25
+ EXPECTATION = """Pong with payload echo'ed is sent in reply to Ping."""
26
+
27
+ def onOpen(self):
28
+ payload = "Hello, world!"
29
+ self.expected[Case.OK] = [("pong", payload), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 9, payload = payload)
31
+ 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 Case2_3(Case):
22
+
23
+ DESCRIPTION = """Send ping with small binary (non UTF-8) payload."""
24
+
25
+ EXPECTATION = """Pong with payload echo'ed is sent in reply to Ping."""
26
+
27
+ def onOpen(self):
28
+ payload = "\x00\xff\xfe\xfd\xfc\xfb\x00\xff"
29
+ self.expected[Case.OK] = [("pong", payload), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 9, payload = payload)
31
+ 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 Case2_4(Case):
22
+
23
+ DESCRIPTION = """Send ping with binary payload of 125 octets."""
24
+
25
+ EXPECTATION = """Pong with payload echo'ed is sent in reply to Ping."""
26
+
27
+ def onOpen(self):
28
+ payload = "\xfe" * 125
29
+ self.expected[Case.OK] = [("pong", payload), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 9, payload = payload)
31
+ 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 Case2_5(Case):
22
+
23
+ DESCRIPTION = """Send ping with binary payload of 126 octets."""
24
+
25
+ EXPECTATION = """Connection is failed immediately, since control frames are only allowed to have payload up to and including 125 octets.."""
26
+
27
+ def onOpen(self):
28
+ payload = "\xfe" * 126
29
+ self.expected[Case.OK] = [("failedByMe", False)]
30
+ self.p.sendFrame(opcode = 9, payload = payload)
31
+ 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 Case2_6(Case):
22
+
23
+ DESCRIPTION = """Send ping with binary payload of 125 octets, send in octet-wise chops."""
24
+
25
+ EXPECTATION = """Pong with payload echo'ed is sent in reply to Ping. Implementations must be TCP clean."""
26
+
27
+ def onOpen(self):
28
+ payload = "\xfe" * 125
29
+ self.expected[Case.OK] = [("pong", payload), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 9, payload = payload, chopsize = 1)
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 Case2_7(Case):
22
+
23
+ DESCRIPTION = """Send unsolicited pong without payload. Verify nothing is received."""
24
+
25
+ EXPECTATION = """Nothing."""
26
+
27
+ def onOpen(self):
28
+ self.expected[Case.OK] = [("failedByMe", True)]
29
+ self.p.sendFrame(opcode = 10)
30
+ 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 Case2_8(Case):
22
+
23
+ DESCRIPTION = """Send unsolicited pong with payload. Verify nothing is received."""
24
+
25
+ EXPECTATION = """Nothing."""
26
+
27
+ def onOpen(self):
28
+ self.expected[Case.OK] = [("failedByMe", True)]
29
+ self.p.sendFrame(opcode = 10, payload = "unsolicited pong 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 Case2_9(Case):
22
+
23
+ DESCRIPTION = """Send unsolicited pong with payload. Send ping with payload. Verify pong for ping is received."""
24
+
25
+ EXPECTATION = """Nothing in reply to own Pong, but Pong with payload echo'ed in reply to Ping."""
26
+
27
+ def onOpen(self):
28
+ payload = "ping payload"
29
+ self.expected[Case.OK] = [("pong", payload), ("failedByMe", True)]
30
+ self.p.sendFrame(opcode = 10, payload = "unsolicited pong payload")
31
+ self.p.sendFrame(opcode = 9, payload = payload)
32
+ self.p.killAfter(1)