You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

44 lines
1.0 KiB

test_name: "Test major encode endpoint"
includes:
- !include includes.yaml
stages:
- name: "Successful encode with default dictionary"
request:
url: "http://{server_address}/{api_base}/major/encode/pl/hello"
method: GET
headers:
X-API-Key: "{api_key}"
response:
strict: False
status_code: 200
json:
input: "hello"
dict: "demo_pl"
result: !anylist
- name: "Successful encode with custom dictionary"
request:
url: "http://{server_address}/{api_base}/major/encode/pl/test?dict=demo_pl"
method: GET
headers:
X-API-Key: "{api_key}"
response:
strict: False
status_code: 200
json:
input: "test"
dict: "demo_pl"
result: !anylist
- name: "Missing authentication returns 401 error"
request:
url: "http://{server_address}/{api_base}/major/encode/pl/hello"
method: GET
response:
strict: False
status_code: 401
json:
error: !anystr