def test_image_is_detected_correctly(): with open(TEST_DATA_PATH / 'faraday.png', "rb") as image_data: field = FaradayUploadedFile(image_data.read()) assert field['content_type'] == 'image/png' assert 'thumb_id' in field.keys() assert 'thumb_path' in field.keys() assert len(field['files']) == 2
def test_image_is_detected_correctly(): with open(os.path.join(CURRENT_PATH, 'data', 'faraday.png'), "rb") as image_data: field = FaradayUploadedFile(image_data.read()) assert field['content_type'] == 'image/png' assert 'thumb_id' in field.keys() assert 'thumb_path' in field.keys() assert len(field['files']) == 2