@@ -152,7 +152,7 @@ def pusher(database):
152152 actor .connect_control ()
153153
154154 yield actor
155- actor .send_control (PoisonPillMessage (sender_name = 'system-test' ))
155+ actor .send_control (PoisonPillMessage ())
156156 if actor .is_alive ():
157157 actor .terminate ()
158158 actor .socket_interface .close ()
@@ -168,7 +168,7 @@ def start_actor(actor: Actor):
168168 actor .start ()
169169 actor .connect_control ()
170170 actor .connect_data ()
171- actor .send_control (StartMessage ('system' ))
171+ actor .send_control (StartMessage ())
172172 _ = actor .receive_control (2000 )
173173
174174
@@ -263,7 +263,7 @@ def init_actor(actor):
263263 @staticmethod
264264 @pytest .fixture
265265 def started_actor (init_actor ):
266- init_actor .send_control (StartMessage ('test_case' ))
266+ init_actor .send_control (StartMessage ())
267267 _ = init_actor .receive_control (2000 )
268268 yield init_actor
269269
@@ -330,7 +330,7 @@ def actor_with_crash_handler(actor):
330330 @staticmethod
331331 @pytest .fixture
332332 def started_actor_with_crash_handler (actor_with_crash_handler ):
333- actor_with_crash_handler .send_control (StartMessage (SENDER_NAME ))
333+ actor_with_crash_handler .send_control (StartMessage ())
334334 _ = actor_with_crash_handler .receive_control (2000 )
335335 return actor_with_crash_handler
336336
@@ -342,22 +342,22 @@ def test_new_actor_is_alive(init_actor):
342342 @staticmethod
343343 @pytest .mark .usefixtures ("shutdown_system" )
344344 def test_send_PoisonPillMessage_set_actor_alive_to_False (init_actor ):
345- init_actor .send_control (PoisonPillMessage (sender_name = 'system-abstract-test' ))
345+ init_actor .send_control (PoisonPillMessage ())
346346 time .sleep (0.1 )
347347 assert not init_actor .is_alive ()
348348
349349 @staticmethod
350350 @pytest .mark .usefixtures ("shutdown_system" )
351351 def test_send_StartMessage_answer_OkMessage (init_actor ):
352- init_actor .send_control (StartMessage (SENDER_NAME ))
352+ init_actor .send_control (StartMessage ())
353353 msg = init_actor .receive_control (2000 )
354354 print ('message start' , str (msg ))
355355 assert isinstance (msg , OKMessage )
356356
357357 @staticmethod
358358 @pytest .mark .usefixtures ("shutdown_system" )
359359 def test_send_StartMessage_to_already_started_actor_answer_ErrorMessage (started_actor ):
360- started_actor .send_control (StartMessage (SENDER_NAME ))
360+ started_actor .send_control (StartMessage ())
361361 msg = started_actor .receive_control (2000 )
362362 assert isinstance (msg , ErrorMessage )
363363 assert msg .error_message == 'Actor already initialized'
@@ -366,13 +366,13 @@ def test_send_StartMessage_to_already_started_actor_answer_ErrorMessage(started_
366366 @pytest .mark .usefixtures ("shutdown_system" )
367367 def test_send_message_on_data_canal_to_non_initialized_actor_raise_NotConnectedException (actor ):
368368 with pytest .raises (NotConnectedException ):
369- actor .send_data (StartMessage (SENDER_NAME ))
369+ actor .send_data (StartMessage ())
370370
371371 @staticmethod
372372 @pytest .mark .usefixtures ("shutdown_system" )
373373 def test_send_message_on_control_canal_to_non_initialized_actor_raise_NotConnectedException (actor ):
374374 with pytest .raises (NotConnectedException ):
375- actor .send_control (StartMessage (SENDER_NAME ))
375+ actor .send_control (StartMessage ())
376376
377377 @staticmethod
378378 @pytest .mark .usefixtures ("shutdown_system" )
@@ -401,7 +401,7 @@ def test_if_actor_behaviour_raise_fatal_exception_the_actor_must_be_killed(actor
401401 @staticmethod
402402 @pytest .mark .usefixtures ("shutdown_system" )
403403 def test_starting_actor_with_a_no_StartMessage_does_no_change_initialized (init_actor ):
404- init_actor .send_control (ErrorMessage ('system' , ' error test' ))
404+ init_actor .send_control (ErrorMessage ('error test' ))
405405 assert not init_actor .state .initialized
406406
407407
@@ -451,7 +451,7 @@ def init_actor_with_db(actor_with_db):
451451 @staticmethod
452452 @pytest .fixture
453453 def started_actor_with_db (init_actor_with_db , fake_db ):
454- init_actor_with_db .send_control (StartMessage ('test_case' ))
454+ init_actor_with_db .send_control (StartMessage ())
455455 _ = init_actor_with_db .receive_control (2000 )
456456 yield init_actor_with_db
457457
@@ -460,7 +460,7 @@ def started_actor_with_db(init_actor_with_db, fake_db):
460460 @staticmethod
461461 @pytest .mark .usefixtures ("shutdown_system" )
462462 def started_actor_with_crash_handler (actor_with_db_and_crash_handler ):
463- actor_with_db_and_crash_handler .send_control (StartMessage (SENDER_NAME ))
463+ actor_with_db_and_crash_handler .send_control (StartMessage ())
464464 _ = actor_with_db_and_crash_handler .receive_control (2000 )
465465 return actor_with_db_and_crash_handler
466466
@@ -472,22 +472,22 @@ def test_new_actor_is_alive(init_actor_with_db):
472472 @staticmethod
473473 @pytest .mark .usefixtures ("shutdown_system" )
474474 def test_send_PoisonPillMessage_set_actor_alive_to_False (init_actor_with_db ):
475- init_actor_with_db .send_control (PoisonPillMessage (sender_name = 'system-abstract-test' ))
475+ init_actor_with_db .send_control (PoisonPillMessage ())
476476 time .sleep (0.1 )
477477 assert not init_actor_with_db .is_alive ()
478478
479479 @staticmethod
480480 @pytest .mark .usefixtures ("shutdown_system" )
481481 def test_send_StartMessage_answer_OkMessage (init_actor_with_db ):
482- init_actor_with_db .send_control (StartMessage (SENDER_NAME ))
482+ init_actor_with_db .send_control (StartMessage ())
483483 msg = init_actor_with_db .receive_control (2000 )
484484 print ('message start' , str (msg ))
485485 assert isinstance (msg , OKMessage )
486486
487487 @staticmethod
488488 @pytest .mark .usefixtures ("shutdown_system" )
489489 def test_send_StartMessage_to_already_started_actor_answer_ErrorMessage (started_actor_with_db ):
490- started_actor_with_db .send_control (StartMessage (SENDER_NAME ))
490+ started_actor_with_db .send_control (StartMessage ())
491491 msg = started_actor_with_db .receive_control (2000 )
492492 assert isinstance (msg , ErrorMessage )
493493 assert msg .error_message == 'Actor already initialized'
@@ -496,13 +496,13 @@ def test_send_StartMessage_to_already_started_actor_answer_ErrorMessage(started_
496496 @pytest .mark .usefixtures ("shutdown_system" )
497497 def test_send_message_on_data_canal_to_non_initialized_actor_raise_NotConnectedException (actor_with_db ):
498498 with pytest .raises (NotConnectedException ):
499- actor_with_db .send_data (StartMessage (SENDER_NAME ))
499+ actor_with_db .send_data (StartMessage ())
500500
501501 @staticmethod
502502 @pytest .mark .usefixtures ("shutdown_system" )
503503 def test_send_message_on_control_canal_to_non_initialized_actor_raise_NotConnectedException (actor_with_db ):
504504 with pytest .raises (NotConnectedException ):
505- actor_with_db .send_control (StartMessage (SENDER_NAME ))
505+ actor_with_db .send_control (StartMessage ())
506506
507507 @staticmethod
508508 @pytest .mark .usefixtures ("shutdown_system" )
@@ -531,5 +531,5 @@ def test_if_actor_behaviour_raise_fatal_exception_the_actor_must_be_killed(init_
531531 @staticmethod
532532 @pytest .mark .usefixtures ("shutdown_system" )
533533 def test_starting_actor_with_a_no_StartMessage_does_no_change_initialized (init_actor_with_db ):
534- init_actor_with_db .send_control (ErrorMessage ('system' , ' error test' ))
534+ init_actor_with_db .send_control (ErrorMessage ('error test' ))
535535 assert not init_actor_with_db .state .initialized
0 commit comments