Commits

Alessio Deiana  committed 407b538

updated .push calls to .fire calls

  • Participants
  • Parent commits 91d12c6

Comments (0)

Files changed (6)

File tests/net/test_pipe.py

         assert pytest.wait_for(a, "ready")
         assert pytest.wait_for(b, "ready")
 
-        a.push(Write(b"foo"))
+        a.fire(Write(b"foo"))
         assert pytest.wait_for(b, "data", b"foo")
 
-        b.push(Write(b"foo"))
+        b.fire(Write(b"foo"))
         assert pytest.wait_for(a, "data", b"foo")
 
-        a.push(Close())
+        a.fire(Close())
         assert pytest.wait_for(a, "disconnected")
 
-        b.push(Close())
+        b.fire(Close())
         assert pytest.wait_for(b, "disconnected")
     finally:
         m.stop()

File tests/net/test_tcp.py

         assert pytest.wait_for(client, "ready")
         assert pytest.wait_for(server, "ready")
 
-        client.push(Connect(server.host, server.port))
+        client.fire((Connect(server.host, server.port))
         assert pytest.wait_for(client, "connected")
         assert pytest.wait_for(server, "connected")
         assert pytest.wait_for(client, "data", b"Ready")
 
-        client.push(Write(b"foo"))
+        client.fire((Write(b"foo"))
         assert pytest.wait_for(server, "data", b"foo")
 
-        client.push(Close())
+        client.fire((Close())
         assert pytest.wait_for(client, "disconnected")
         assert pytest.wait_for(server, "disconnected")
 
         assert pytest.wait_for(server, "ready")
 
         # 1st connect
-        client.push(Connect(server.host, server.port))
+        client.fire((Connect(server.host, server.port))
         assert pytest.wait_for(client, "connected")
         assert pytest.wait_for(server, "connected")
         assert pytest.wait_for(client, "data", b"Ready")
 
-        client.push(Write(b"foo"))
+        client.fire((Write(b"foo"))
         assert pytest.wait_for(server, "data", b"foo")
 
         # disconnect
-        client.push(Close())
+        client.fire((Close())
         assert pytest.wait_for(client, "disconnected")
 
         # 2nd reconnect
-        client.push(Connect(server.host, server.port))
+        client.fire((Connect(server.host, server.port))
         assert pytest.wait_for(client, "connected")
         assert pytest.wait_for(server, "connected")
         assert pytest.wait_for(client, "data", b"Ready")
 
-        client.push(Write(b"foo"))
+        client.fire((Write(b"foo"))
         assert pytest.wait_for(server, "data", b"foo")
 
-        client.push(Close())
+        client.fire((Close())
         assert pytest.wait_for(client, "disconnected")
         assert pytest.wait_for(server, "disconnected")
 
         tcp_server._sock.close()
 
         # 1st connect
-        client.push(Connect(host, port))
+        client.fire((Connect(host, port))
         assert pytest.wait_for(client, "connected")
 
-        client.push(Write(b"foo"))
+        client.fire((Write(b"foo"))
         assert pytest.wait_for(client, "disconnected")
 
         client.disconnected = False
-        client.push(Write(b"foo"))
+        client.fire((Write(b"foo"))
         assert pytest.wait_for(client, "disconnected", timeout=1.0) is None
     finally:
         m.stop()
         assert pytest.wait_for(client, "ready")
         assert pytest.wait_for(server, "ready")
 
-        client.push(Connect(server.host, server.port))
+        client.fire((Connect(server.host, server.port))
         assert pytest.wait_for(client, "connected")
         assert pytest.wait_for(server, "connected")
         assert pytest.wait_for(client, "data", b"Ready")
 
         assert server.client[1] == bind_port
 
-        client.push(Write(b"foo"))
+        client.fire((Write(b"foo"))
         assert pytest.wait_for(server, "data", b"foo")
 
-        client.push(Close())
+        client.fire((Close())
         assert pytest.wait_for(client, "disconnected")
         assert pytest.wait_for(server, "disconnected")
 

File tests/net/test_unix.py

         assert pytest.wait_for(server, "ready")
         assert pytest.wait_for(client, "ready")
 
-        client.push(Connect(filename))
+        client.fire((Connect(filename))
         assert pytest.wait_for(client, "connected")
         assert pytest.wait_for(server, "connected")
         assert pytest.wait_for(client, "data", b"Ready")
 
-        client.push(Write(b"foo"))
+        client.fire((Write(b"foo"))
         assert pytest.wait_for(server, "data", b"foo")
 
-        client.push(Close())
+        client.fire((Close())
         assert pytest.wait_for(client, "disconnected")
         assert pytest.wait_for(server, "disconnected")
 

File tests/web/test_client.py

     client = Client(webapp.server.base)
     client.start()
 
-    client.push(Connect())
+    client.fire((Connect())
     assert pytest.wait_event(client, 'connected', target='client')
 
-    client.push(Request("GET", "/"))
+    client.fire((Request("GET", "/"))
     while client.response is None: pass
 
     client.stop()

File tests/web/test_gzip.py

         return "Hello World!"
 
 def test(webapp):
-    from circuits import Debugger
-    Debugger().register(webapp)
-
     gzip = Gzip()
     gzip.register(webapp)
 

File tests/web/test_http.py

     client.start()
 
     host, port, resource, secure = parse_url(webapp.server.base)
-    client.push(Connect(host, port))
+    client.fire((Connect(host, port))
     assert pytest.wait_for(transport, "connected")
 
-    client.push(Write(b"GET / HTTP/1.1\r\n"))
-    client.push(Write(b"Content-Type: text/plain\r\n\r\n"))
+    client.fire((Write(b"GET / HTTP/1.1\r\n"))
+    client.fire((Write(b"Content-Type: text/plain\r\n\r\n"))
     assert pytest.wait_for(client, "done")
 
     client.stop()