()
| 601 | |
| 602 | @responses.activate |
| 603 | def test_response_mime_overwrite(): |
| 604 | responses.add( |
| 605 | method=responses.GET, |
| 606 | url=DUMMY_URL, |
| 607 | body=XML_DATA_RAW, |
| 608 | content_type='text/plain', |
| 609 | ) |
| 610 | r = http( |
| 611 | '--offline', |
| 612 | '--raw', XML_DATA_RAW, |
| 613 | '--response-mime=application/xml', DUMMY_URL |
| 614 | ) |
| 615 | assert XML_DATA_RAW in r # not affecting request bodies |
| 616 | |
| 617 | r = http('--response-mime=application/xml', DUMMY_URL) |
| 618 | assert XML_DATA_FORMATTED in r |
| 619 | |
| 620 | |
| 621 | @responses.activate |