| @@ 190-228 (lines=39) @@ | ||
| 187 | first_time_year=2020, |
|
| 188 | ) |
|
| 189 | ||
| 190 | def test_create_schedule_with_first_time_invalid_month(self): |
|
| 191 | with self.assertRaises(InvalidArgument): |
|
| 192 | self.gmp.create_schedule( |
|
| 193 | name='foo', |
|
| 194 | first_time_minute=0, |
|
| 195 | first_time_hour=0, |
|
| 196 | first_time_day_of_month=1, |
|
| 197 | first_time_month='', |
|
| 198 | first_time_year=2020, |
|
| 199 | ) |
|
| 200 | ||
| 201 | with self.assertRaises(InvalidArgument): |
|
| 202 | self.gmp.create_schedule( |
|
| 203 | name='foo', |
|
| 204 | first_time_minute=0, |
|
| 205 | first_time_hour=0, |
|
| 206 | first_time_day_of_month=1, |
|
| 207 | first_time_month=0, |
|
| 208 | first_time_year=2020, |
|
| 209 | ) |
|
| 210 | ||
| 211 | with self.assertRaises(InvalidArgument): |
|
| 212 | self.gmp.create_schedule( |
|
| 213 | name='foo', |
|
| 214 | first_time_minute=0, |
|
| 215 | first_time_hour=0, |
|
| 216 | first_time_day_of_month=1, |
|
| 217 | first_time_month=-1, |
|
| 218 | first_time_year=2020, |
|
| 219 | ) |
|
| 220 | ||
| 221 | with self.assertRaises(InvalidArgument): |
|
| 222 | self.gmp.create_schedule( |
|
| 223 | name='foo', |
|
| 224 | first_time_minute=0, |
|
| 225 | first_time_hour=0, |
|
| 226 | first_time_day_of_month=1, |
|
| 227 | first_time_month=13, |
|
| 228 | first_time_year=2020, |
|
| 229 | ) |
|
| 230 | ||
| 231 | def test_create_schedule_with_first_time_missing_year(self): |
|
| @@ 139-177 (lines=39) @@ | ||
| 136 | first_time_year=2020, |
|
| 137 | ) |
|
| 138 | ||
| 139 | def test_create_schedule_with_first_time_invalid_day_of_month(self): |
|
| 140 | with self.assertRaises(InvalidArgument): |
|
| 141 | self.gmp.create_schedule( |
|
| 142 | name='foo', |
|
| 143 | first_time_minute=0, |
|
| 144 | first_time_hour=0, |
|
| 145 | first_time_day_of_month='', |
|
| 146 | first_time_month=1, |
|
| 147 | first_time_year=2020, |
|
| 148 | ) |
|
| 149 | ||
| 150 | with self.assertRaises(InvalidArgument): |
|
| 151 | self.gmp.create_schedule( |
|
| 152 | name='foo', |
|
| 153 | first_time_minute=0, |
|
| 154 | first_time_hour=0, |
|
| 155 | first_time_day_of_month=0, |
|
| 156 | first_time_month=1, |
|
| 157 | first_time_year=2020, |
|
| 158 | ) |
|
| 159 | ||
| 160 | with self.assertRaises(InvalidArgument): |
|
| 161 | self.gmp.create_schedule( |
|
| 162 | name='foo', |
|
| 163 | first_time_minute=0, |
|
| 164 | first_time_hour=0, |
|
| 165 | first_time_day_of_month=-1, |
|
| 166 | first_time_month=1, |
|
| 167 | first_time_year=2020, |
|
| 168 | ) |
|
| 169 | ||
| 170 | with self.assertRaises(InvalidArgument): |
|
| 171 | self.gmp.create_schedule( |
|
| 172 | name='foo', |
|
| 173 | first_time_minute=0, |
|
| 174 | first_time_hour=0, |
|
| 175 | first_time_day_of_month=32, |
|
| 176 | first_time_month=1, |
|
| 177 | first_time_year=2020, |
|
| 178 | ) |
|
| 179 | ||
| 180 | def test_create_schedule_with_first_time_missing_month(self): |
|