| @@ 209-247 (lines=39) @@ | ||
| 206 | first_time_year=2020, |
|
| 207 | ) |
|
| 208 | ||
| 209 | def test_modify_schedule_with_first_time_invalid_month(self): |
|
| 210 | with self.assertRaises(InvalidArgument): |
|
| 211 | self.gmp.modify_schedule( |
|
| 212 | schedule_id='s1', |
|
| 213 | first_time_minute=0, |
|
| 214 | first_time_hour=0, |
|
| 215 | first_time_day_of_month=1, |
|
| 216 | first_time_month='', |
|
| 217 | first_time_year=2020, |
|
| 218 | ) |
|
| 219 | ||
| 220 | with self.assertRaises(InvalidArgument): |
|
| 221 | self.gmp.modify_schedule( |
|
| 222 | schedule_id='s1', |
|
| 223 | first_time_minute=0, |
|
| 224 | first_time_hour=0, |
|
| 225 | first_time_day_of_month=1, |
|
| 226 | first_time_month=0, |
|
| 227 | first_time_year=2020, |
|
| 228 | ) |
|
| 229 | ||
| 230 | with self.assertRaises(InvalidArgument): |
|
| 231 | self.gmp.modify_schedule( |
|
| 232 | schedule_id='s1', |
|
| 233 | first_time_minute=0, |
|
| 234 | first_time_hour=0, |
|
| 235 | first_time_day_of_month=1, |
|
| 236 | first_time_month=-1, |
|
| 237 | first_time_year=2020, |
|
| 238 | ) |
|
| 239 | ||
| 240 | with self.assertRaises(InvalidArgument): |
|
| 241 | self.gmp.modify_schedule( |
|
| 242 | schedule_id='s1', |
|
| 243 | first_time_minute=0, |
|
| 244 | first_time_hour=0, |
|
| 245 | first_time_day_of_month=1, |
|
| 246 | first_time_month=13, |
|
| 247 | first_time_year=2020, |
|
| 248 | ) |
|
| 249 | ||
| 250 | def test_modify_schedule_with_first_time_missing_year(self): |
|
| @@ 158-196 (lines=39) @@ | ||
| 155 | first_time_year=2020, |
|
| 156 | ) |
|
| 157 | ||
| 158 | def test_modify_schedule_with_first_time_invalid_day_of_month(self): |
|
| 159 | with self.assertRaises(InvalidArgument): |
|
| 160 | self.gmp.modify_schedule( |
|
| 161 | schedule_id='s1', |
|
| 162 | first_time_minute=0, |
|
| 163 | first_time_hour=0, |
|
| 164 | first_time_day_of_month='', |
|
| 165 | first_time_month=1, |
|
| 166 | first_time_year=2020, |
|
| 167 | ) |
|
| 168 | ||
| 169 | with self.assertRaises(InvalidArgument): |
|
| 170 | self.gmp.modify_schedule( |
|
| 171 | schedule_id='s1', |
|
| 172 | first_time_minute=0, |
|
| 173 | first_time_hour=0, |
|
| 174 | first_time_day_of_month=0, |
|
| 175 | first_time_month=1, |
|
| 176 | first_time_year=2020, |
|
| 177 | ) |
|
| 178 | ||
| 179 | with self.assertRaises(InvalidArgument): |
|
| 180 | self.gmp.modify_schedule( |
|
| 181 | schedule_id='s1', |
|
| 182 | first_time_minute=0, |
|
| 183 | first_time_hour=0, |
|
| 184 | first_time_day_of_month=-1, |
|
| 185 | first_time_month=1, |
|
| 186 | first_time_year=2020, |
|
| 187 | ) |
|
| 188 | ||
| 189 | with self.assertRaises(InvalidArgument): |
|
| 190 | self.gmp.modify_schedule( |
|
| 191 | schedule_id='s1', |
|
| 192 | first_time_minute=0, |
|
| 193 | first_time_hour=0, |
|
| 194 | first_time_day_of_month=32, |
|
| 195 | first_time_month=1, |
|
| 196 | first_time_year=2020, |
|
| 197 | ) |
|
| 198 | ||
| 199 | def test_modify_schedule_with_first_time_missing_month(self): |
|