Commit 097c7f2fcad3dcccc371155427fa7fe2d4773287
1 parent
5102145b
Generalize test_claim_answer_data function
Showing
2 changed files
with
1 additions
and
34 deletions
| ... | ... | @@ -238,40 +238,10 @@ test_claim_data = test_complaint_data |
| 238 | 238 | |
| 239 | 239 | |
| 240 | 240 | def test_claim_answer_data(status): |
| 241 | - data = test_claim_resolved_answer_data() | |
| 242 | - if status == 'declined': | |
| 243 | - data = test_claim_declined_answer_data() | |
| 244 | - elif status == 'invalid': | |
| 245 | - data = test_claim_invalid_answer_data() | |
| 246 | - return data | |
| 247 | - | |
| 248 | - | |
| 249 | -def test_claim_resolved_answer_data(): | |
| 250 | - return munchify({ | |
| 251 | - "data": { | |
| 252 | - "status": "answered", | |
| 253 | - "resolutionType": "resolved", | |
| 254 | - "tendererAction": fake.sentence(nb_words=10, variable_nb_words=True), | |
| 255 | - "resolution": fake.sentence(nb_words=15, variable_nb_words=True) | |
| 256 | - } | |
| 257 | - }) | |
| 258 | - | |
| 259 | - | |
| 260 | -def test_claim_declined_answer_data(): | |
| 261 | - return munchify({ | |
| 262 | - "data": { | |
| 263 | - "status": "answered", | |
| 264 | - "resolutionType": "declined", | |
| 265 | - "tendererAction": fake.sentence(nb_words=10, variable_nb_words=True), | |
| 266 | - "resolution": fake.sentence(nb_words=15, variable_nb_words=True) | |
| 267 | - } | |
| 268 | - }) | |
| 269 | - | |
| 270 | -def test_claim_invalid_answer_data(): | |
| 271 | 241 | return munchify({ |
| 272 | 242 | "data": { |
| 273 | 243 | "status": "answered", |
| 274 | - "resolutionType": "invalid", | |
| 244 | + "resolutionType": status, | |
| 275 | 245 | "tendererAction": fake.sentence(nb_words=10, variable_nb_words=True), |
| 276 | 246 | "resolution": fake.sentence(nb_words=15, variable_nb_words=True) |
| 277 | 247 | } | ... | ... |
| ... | ... | @@ -24,9 +24,6 @@ from .initial_data import ( |
| 24 | 24 | test_bid_data, |
| 25 | 25 | test_bid_value, |
| 26 | 26 | test_claim_answer_data, |
| 27 | - test_claim_declined_answer_data, | |
| 28 | - test_claim_invalid_answer_data, | |
| 29 | - test_claim_resolved_answer_data, | |
| 30 | 27 | test_claim_data, |
| 31 | 28 | test_complaint_data, |
| 32 | 29 | test_complaint_reply_data, | ... | ... |
Please
register
or
login
to post a comment