| 1035 |  | 
mandos-ctl: Refactor; move parsing of intervals into argument parsing
 * mandos-ctl (MillisecondsValueArgumentMixIn.value_to_set): Assume
 that an incoming value is datetime.timedelta(), not a string.
 (add_command_line_options): Add "type=string_to_delta" to --timeout,
 --extended-timeout, --interval, --approval-delay, and
 --approval-duration.
 (TestSetTimeoutCmd, TestSetExtendedTimeoutCmd, TestSetIntervalCmd,
 TestSetApprovalDelayCmd, TestSetApprovalDurationCmd): Change
 values_to_set to be datetime.timedelta() values, and change to more
 appropriate values to test.  Also adjust values_to_get accordingly.
 
 | Teddy Hogeborn | 6 years ago |  |   | 
| 1034 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1033 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1032 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1031 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1030 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1029 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1028 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1027 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1026 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1025 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1024 |  | 
mandos-ctl: Add more tests, including tests for all commands
 * mandos-ctl (Test_string_to_delta.test_handles_basic_rfc3339): Add a
 few more test cases.
 (TestCmd.setUp.MockClient.Set, TestCmd.setUp.MockClient.Get): Don't
 append to self.calls, since nobody should use it to check for Set()
 or Get() calls; instead, the return value of Get() should be
 inspected, and the MockClient.attributes dict should be inspected
 after (implicitly) calling Set().
 (Unique): New; stand-in for unittest.mock.sentinel.
 (TestPropertyCmd): New; abstract class testing PropertyCmd classes.
 (TestBumpTimeoutCmd, TestStartCheckerCmd, TestStopCheckerCmd,
 TestApproveByDefaultCmd, TestDenyByDefaultCmd): New.
 (TestValueArgumentPropertyCmd): New; abstract class for testing
 those PropertyCmd classes which also
 inherit from ValueArgumentMixIn.
 (TestSetCheckerCmd, TestSetHostCmd, TestSetSecretCmd,
 TestSetTimeoutCmd, TestSetExtendedTimeoutCmd, TestSetIntervalCmd,
 TestSetApprovalDelayCmd, TestSetApprovalDurationCmd): New.
 
 | Teddy Hogeborn | 6 years ago |  |   | 
| 1023 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1022 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1021 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1020 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1019 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1018 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1017 |  |  | Teddy Hogeborn | 6 years ago |  |   | 
| 1016 |  |  | Teddy Hogeborn | 6 years ago |  |   |