File tree Expand file tree Collapse file tree
tests/integration/modules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -559,6 +559,27 @@ def test_set_computer_policy_ClipboardRedirection(self):
559559 ],
560560 )
561561
562+ @destructiveTest
563+ def test_set_computer_policy_LockoutDuration (self ):
564+ """
565+ Test setting LockoutDuration
566+ """
567+ # For LockoutDuration to be meaningful, first configure
568+ # LockoutThreshold
569+ self ._testSeceditPolicy ("LockoutThreshold" , 3 , [r"^LockoutBadCount = 3" ])
570+
571+ # Next set the LockoutDuration non-zero value, as this is required
572+ # before setting LockoutWindow
573+ self ._testSeceditPolicy ("LockoutDuration" , 60 , [r"^LockoutDuration = 60" ])
574+
575+ # Now set LockoutWindow to a valid value <= LockoutDuration. If this
576+ # is not set, then the LockoutDuration zero value is ignored by the
577+ # Windows API (leading to a false sense of accomplishment)
578+ self ._testSeceditPolicy ("LockoutWindow" , 60 , [r"^ResetLockoutCount = 60" ])
579+
580+ # set LockoutDuration zero value, the secedit zero value is -1
581+ self ._testSeceditPolicy ("LockoutDuration" , 0 , [r"^LockoutDuration = -1" ])
582+
562583 @destructiveTest
563584 def test_set_computer_policy_GuestAccountStatus (self ):
564585 """
You can’t perform that action at this time.
0 commit comments