Add radio buttons for choosing the API key type

Best-guess wording for what the labels and question should be.

Adds a macro for rendering radio buttons from a WTForms field.
This commit is contained in:
Chris Hill-Scott
2016-06-29 17:10:49 +01:00
parent 49d8e68589
commit 7fcd56dc02
6 changed files with 67 additions and 6 deletions

View File

@@ -72,8 +72,13 @@ def test_should_create_api_key_with_type_normal(app_,
with app_.test_request_context(), app_.test_client() as client:
client.login(api_user_active)
response = client.post(url_for('main.create_api_key', service_id=service_id),
data={'key_name': 'some default key name'})
response = client.post(
url_for('main.create_api_key', service_id=service_id),
data={
'key_name': 'some default key name',
'key_type': 'normal'
}
)
assert response.status_code == 200
assert 'some default key name' in response.get_data(as_text=True)