@@ -343,6 +343,42 @@ def test_success_dot1x(self):
343343 '00:00:00:00:00:01' ).state ,
344344 FullEAPStateMachine .SUCCESS2 )
345345
346+
347+
348+
349+ @patch_things
350+ @setup_generators (sup_replies_success , radius_replies_success )
351+ def test_chewie_identity_response_dot1x (self ):
352+ """test port status api and that identity request is sent after port up"""
353+
354+ global TO_SUPPLICANT
355+ pool = eventlet .GreenPool ()
356+ pool .spawn (self .chewie .run )
357+ eventlet .sleep (1 )
358+ self .chewie .port_down ("00:00:00:00:00:01" )
359+
360+ self .chewie .port_up ("00:00:00:00:00:01" )
361+
362+ while not self .fake_scheduler .jobs :
363+ eventlet .sleep (SHORT_SLEEP )
364+ self .fake_scheduler .run_jobs (num_jobs = 1 )
365+
366+ # check preemptive sent directly after port up
367+ out_packet = TO_SUPPLICANT .get ()
368+ self .assertEqual (out_packet ,
369+ bytes .fromhex ('0180C2000003000000000001888e010000050167000501' ))
370+
371+ # Send a response to the request
372+ FROM_SUPPLICANT .put_nowait (bytes .fromhex ("0000000000010242ac17006f888e010000050167000501" ))
373+ eventlet .sleep (2 )
374+
375+ self .assertEqual (
376+ self .chewie .get_state_machine ('02:42:ac:17:00:6f' ,
377+ '00:00:00:00:00:01' ).state ,
378+ FullEAPStateMachine .AAA_IDLE )
379+
380+
381+
346382 @patch_things
347383 def test_port_status_changes (self ):
348384 """test port status api and that identity request is sent after port up"""
0 commit comments