<s> from __future__ import absolute_import <EOL> import os <EOL> if os . environ . get ( '<STR_LIT>' , False ) : <EOL> from twisted . trial import unittest <EOL> from autobahn . wamp . websocket import WampWebSocketProtocol <EOL> class TestWebsocketProtocol ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . protocol = WampWebSocketProtocol ( ) <EOL> def test_close_before_open ( self ) : <EOL> self . protocol . onClose ( True , <NUM_LIT:1> , "<STR_LIT>" ) </s>
