| @@ 260-278 (lines=19) @@ | ||
| 257 | first_time_month=12, |
|
| 258 | ) |
|
| 259 | ||
| 260 | def test_modify_schedule_with_first_time_invalid_year(self): |
|
| 261 | with self.assertRaises(InvalidArgument): |
|
| 262 | self.gmp.modify_schedule( |
|
| 263 | schedule_id='s1', |
|
| 264 | first_time_minute=0, |
|
| 265 | first_time_hour=0, |
|
| 266 | first_time_day_of_month=1, |
|
| 267 | first_time_month=1, |
|
| 268 | first_time_year=1, |
|
| 269 | ) |
|
| 270 | ||
| 271 | with self.assertRaises(InvalidArgument): |
|
| 272 | self.gmp.modify_schedule( |
|
| 273 | schedule_id='s1', |
|
| 274 | first_time_minute=0, |
|
| 275 | first_time_hour=0, |
|
| 276 | first_time_day_of_month=1, |
|
| 277 | first_time_month=0, |
|
| 278 | first_time_year=2020, |
|
| 279 | ) |
|
| 280 | ||
| 281 | def test_modify_schedule_with_name(self): |
|
| @@ 127-145 (lines=19) @@ | ||
| 124 | first_time_year=2020, |
|
| 125 | ) |
|
| 126 | ||
| 127 | def test_modify_schedule_with_first_time_invalid_hour(self): |
|
| 128 | with self.assertRaises(InvalidArgument): |
|
| 129 | self.gmp.modify_schedule( |
|
| 130 | schedule_id='s1', |
|
| 131 | first_time_minute=10, |
|
| 132 | first_time_hour='', |
|
| 133 | first_time_day_of_month=1, |
|
| 134 | first_time_month=1, |
|
| 135 | first_time_year=2020, |
|
| 136 | ) |
|
| 137 | ||
| 138 | with self.assertRaises(InvalidArgument): |
|
| 139 | self.gmp.modify_schedule( |
|
| 140 | schedule_id='s1', |
|
| 141 | first_time_minute=10, |
|
| 142 | first_time_hour=-1, |
|
| 143 | first_time_day_of_month=1, |
|
| 144 | first_time_month=1, |
|
| 145 | first_time_year=2020, |
|
| 146 | ) |
|
| 147 | ||
| 148 | def test_modify_schedule_with_first_time_missing_day_of_month(self): |
|
| @@ 97-114 (lines=18) @@ | ||
| 94 | first_time_year=2020, |
|
| 95 | ) |
|
| 96 | ||
| 97 | def test_modify_schedule_with_first_time_invalid_minute(self): |
|
| 98 | with self.assertRaises(InvalidArgument): |
|
| 99 | self.gmp.modify_schedule( |
|
| 100 | schedule_id='s1', |
|
| 101 | first_time_minute='', |
|
| 102 | first_time_hour=1, |
|
| 103 | first_time_day_of_month=1, |
|
| 104 | first_time_month=1, |
|
| 105 | first_time_year=2020, |
|
| 106 | ) |
|
| 107 | with self.assertRaises(InvalidArgument): |
|
| 108 | self.gmp.modify_schedule( |
|
| 109 | schedule_id='s1', |
|
| 110 | first_time_minute=-1, |
|
| 111 | first_time_hour=1, |
|
| 112 | first_time_day_of_month=1, |
|
| 113 | first_time_month=1, |
|
| 114 | first_time_year=2020, |
|
| 115 | ) |
|
| 116 | ||
| 117 | def test_modify_schedule_with_first_time_missing_hour(self): |
|