How to coordinate server side event when testing event-stream?

16 views
Skip to first unread message

niuji...@gmail.com

unread,
Apr 30, 2022, 10:52:56 PM4/30/22
to cherrypy-users
I'm using cherrypy.test 

class Test_BasicPage(helper.CPWebCase):
        ....
        def test_eventSource(self):
               self.getPage("/updateSSE")
               self.assertBody() # Here I need a hook that can allow me to trigger the event on the server side


Is there a best practice when it comes to testing event-stream using helper.CPWebCase? Thanks.





Sviatoslav Sydorenko (@webknjaz)

unread,
Jan 16, 2023, 12:06:24 PM1/16/23
to cherrypy-users
неділя, 1 травня 2022 р. о 04:52:56 UTC+2 niuji...@gmail.com пише:
There's no helper for this. You'd have to inspect the source code. One way could be implementing another HTTP
handler that would trigger something in the server (maybe, through plugins?) cascading in the event in this one...
Reply all
Reply to author
Forward
0 new messages