|
| 1 | +* Request can be run with the following curl command: |
| 2 | +* curl 'http://localhost:8000/error-format-long/html' |
| 3 | + |
| 4 | +HTTP/1.1 200 |
| 5 | +Content-Length: 45 |
| 6 | +Content-Type: text/html; charset=utf-8 |
| 7 | +Date: <<<.*?>>> |
| 8 | +Server: Flask Server |
| 9 | +Via: waitress |
| 10 | + |
| 11 | +<html><head><title>Test</title></head></html> |
| 12 | + |
| 13 | +error: Assert header value |
| 14 | + --> tests_failed/error_format_long/error_format_long.hurl:7:15 |
| 15 | + | |
| 16 | + | GET http://localhost:8000/error-format-long/html |
| 17 | + | ... |
| 18 | + 7 | Content-Type: text/html |
| 19 | + | ^^^^^^^^^ actual value is <text/html; charset=utf-8> |
| 20 | + | |
| 21 | + |
| 22 | +error: Assert failure |
| 23 | + --> tests_failed/error_format_long/error_format_long.hurl:9:0 |
| 24 | + | |
| 25 | + | GET http://localhost:8000/error-format-long/html |
| 26 | + | ... |
| 27 | + 9 | xpath "string(//head/title)" == "Welcome!" |
| 28 | + | actual: string <Test> |
| 29 | + | expected: string <Welcome!> |
| 30 | + | |
| 31 | + |
| 32 | +error: Assert failure |
| 33 | + --> tests_failed/error_format_long/error_format_long.hurl:11:0 |
| 34 | + | |
| 35 | + | GET http://localhost:8000/error-format-long/html |
| 36 | + | ... |
| 37 | +11 | xpath "//title" count == 2 |
| 38 | + | actual: integer <1> |
| 39 | + | expected: integer <2> |
| 40 | + | |
| 41 | + |
| 42 | +* Request can be run with the following curl command: |
| 43 | +* curl 'http://localhost:8000/error-format-long/json' |
| 44 | + |
| 45 | +HTTP/1.1 200 |
| 46 | +Content-Length: 115 |
| 47 | +Content-Type: application/json |
| 48 | +Date: <<<.*?>>> |
| 49 | +Server: Flask Server |
| 50 | +Via: waitress |
| 51 | + |
| 52 | +{"books": [{"name": "Dune", "author": "Franck Herbert"}, {"name": "Les Mis\u00e9rables", "author": "Victor Hugo"}]} |
| 53 | + |
| 54 | +error: Assert failure |
| 55 | + --> tests_failed/error_format_long/error_format_long.hurl:18:0 |
| 56 | + | |
| 57 | + | GET http://localhost:8000/error-format-long/json |
| 58 | + | ... |
| 59 | +18 | jsonpath "$.books" count == 12 |
| 60 | + | actual: integer <2> |
| 61 | + | expected: integer <12> |
| 62 | + | |
| 63 | + |
| 64 | +* Request can be run with the following curl command: |
| 65 | +* curl 'http://localhost:8000/error-format-long/rfc-7807' |
| 66 | + |
| 67 | +HTTP/1.1 200 |
| 68 | +Content-Length: 258 |
| 69 | +Content-Type: application/problem+json |
| 70 | +Date: <<<.*?>>> |
| 71 | +Server: Flask Server |
| 72 | +Via: waitress |
| 73 | + |
| 74 | +{"type": "https://example.com/probs/out-of-credit", "title": "You do not have enough credit.", "detail": "Your current balance is 30, but that costs 50.", "instance": "/account/12345/msgs/abc", "balance": 30, "accounts": ["/account/12345", "/account/67890"]} |
| 75 | + |
| 76 | +error: Assert failure |
| 77 | + --> tests_failed/error_format_long/error_format_long.hurl:26:0 |
| 78 | + | |
| 79 | + | GET http://localhost:8000/error-format-long/rfc-7807 |
| 80 | + | ... |
| 81 | +26 | jsonpath "$.title" == "You have enough credit." |
| 82 | + | actual: string <You do not have enough credit.> |
| 83 | + | expected: string <You have enough credit.> |
| 84 | + | |
| 85 | + |
| 86 | +* Request can be run with the following curl command: |
| 87 | +* curl 'http://localhost:8000/error-format-long/fhir' |
| 88 | + |
| 89 | +HTTP/1.1 200 |
| 90 | +Content-Length: 902 |
| 91 | +Content-Type: application/fhir+json |
| 92 | +Date: <<<.*?>>> |
| 93 | +Server: Flask Server |
| 94 | +Via: waitress |
| 95 | + |
| 96 | +{"resourceType": "Practitioner", "id": "example", "text": {"status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <p>Dr Adam Careful is a Referring Practitioner for Acme Hospital from 1-Jan 2012 to 31-Mar\n 2012</p>\n </div>"}, "identifier": [{"system": "http://www.acme.org/practitioners", "value": "23"}], "active": true, "name": [{"family": "Careful", "given": ["Adam"], "prefix": ["Dr"]}], "address": [{"use": "home", "line": ["534 Erewhon St"], "city": "PleasantVille", "state": "Vic", "postalCode": "3999"}], "qualification": [{"identifier": [{"system": "http://example.org/UniversityIdentifier", "value": "12345"}], "code": {"coding": [{"system": "http://terminology.hl7.org/CodeSystem/v2-0360/2.7", "code": "BS", "display": "Bachelor of Science"}], "text": "Bachelor of Science"}, "period": {"start": "1995"}, "issuer": {"display": "Example University"}}]} |
| 97 | + |
| 98 | +error: Assert failure |
| 99 | + --> tests_failed/error_format_long/error_format_long.hurl:34:0 |
| 100 | + | |
| 101 | + | GET http://localhost:8000/error-format-long/fhir |
| 102 | + | ... |
| 103 | +34 | jsonpath "$.id" == "foo" |
| 104 | + | actual: string <example> |
| 105 | + | expected: string <foo> |
| 106 | + | |
| 107 | + |
| 108 | +* Request can be run with the following curl command: |
| 109 | +* curl 'http://localhost:8000/error-format-long/csv' |
| 110 | + |
| 111 | +HTTP/1.1 200 |
| 112 | +Content-Length: 726 |
| 113 | +Content-Type: text/csv; charset=utf-8 |
| 114 | +Date: <<<.*?>>> |
| 115 | +Server: Flask Server |
| 116 | +Via: waitress |
| 117 | + |
| 118 | +"Year","Score","Title" |
| 119 | +1968,86,"Greetings" |
| 120 | +1970,17,"Bloody Mama" |
| 121 | +1970,73,"Hi, Mom!" |
| 122 | +1971,40,"Born to Win" |
| 123 | +1973,98,"Mean Streets" |
| 124 | +1973,88,"Bang the Drum Slowly" |
| 125 | +1974,97,"The Godfather, Part II" |
| 126 | +1976,41,"The Last Tycoon" |
| 127 | +1976,99,"Taxi Driver" |
| 128 | +1977,47,"1900" |
| 129 | +1977,67,"New York, New York" |
| 130 | +1978,93,"The Deer Hunter" |
| 131 | +1980,97,"Raging Bull" |
| 132 | +1981,75,"True Confessions" |
| 133 | +1983,90,"The King of Comedy" |
| 134 | +1984,89,"Once Upon a Time in America" |
| 135 | +1984,60,"Falling in Love" |
| 136 | +1985,98,"Brazil" |
| 137 | +1986,65,"The Mission" |
| 138 | +1987,00,"Dear America: Letters Home From Vietnam" |
| 139 | +1987,80,"The Untouchables" |
| 140 | +1987,78,"Angel Heart" |
| 141 | +1988,96,"Midnight Run" |
| 142 | +1989,64,"Jacknife" |
| 143 | +1989,47,"We're No Angels" |
| 144 | +1990,88,"Awakenings" |
| 145 | +1990,29,"Stanley & Iris" |
| 146 | +1990,96,"Goodfellas" |
| 147 | + |
| 148 | + |
| 149 | +error: Assert failure |
| 150 | + --> tests_failed/error_format_long/error_format_long.hurl:42:0 |
| 151 | + | |
| 152 | + | GET http://localhost:8000/error-format-long/csv |
| 153 | + | ... |
| 154 | +42 | body split "\n" nth 9 split "," nth 2 == "\"Taxi\"" |
| 155 | + | actual: string <"Taxi Driver"> |
| 156 | + | expected: string <"Taxi"> |
| 157 | + | |
| 158 | + |
| 159 | +* Request can be run with the following curl command: |
| 160 | +* curl 'http://localhost:8000/error-format-long/bytes' |
| 161 | + |
| 162 | +HTTP/1.1 200 |
| 163 | +Content-Length: 4 |
| 164 | +Content-Type: application/octet-stream |
| 165 | +Date: <<<.*?>>> |
| 166 | +Server: Flask Server |
| 167 | +Via: waitress |
| 168 | + |
| 169 | +Bytes <deadbeef...> |
| 170 | + |
| 171 | +error: Assert failure |
| 172 | + --> tests_failed/error_format_long/error_format_long.hurl:50:0 |
| 173 | + | |
| 174 | + | GET http://localhost:8000/error-format-long/bytes |
| 175 | + | ... |
| 176 | +50 | bytes == hex,beef; |
| 177 | + | actual: bytes <deadbeef> |
| 178 | + | expected: bytes <beef> |
| 179 | + | |
| 180 | + |
0 commit comments