mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-26 02:49:16 -04:00
Talk about trial mode on API keys page
When you make a ‘normal’ API key it won’t work as described until your serivce is live. We should make this clear at the point at which you choose this key.
This commit is contained in:
@@ -12,6 +12,7 @@ def test_return_validation_error_when_key_name_exists(app_):
|
||||
with app_.test_request_context():
|
||||
form = CreateKeyForm(_get_names(),
|
||||
formdata=MultiDict([('key_name', 'Some key')]))
|
||||
form.key_type.choices = [('a', 'a'), ('b', 'b')]
|
||||
form.validate()
|
||||
assert form.errors['key_name'] == ['A key with this name already exists']
|
||||
|
||||
@@ -28,5 +29,6 @@ def test_return_validation_error_when_key_type_not_chosen(app_, key_type, expect
|
||||
form = CreateKeyForm(
|
||||
[],
|
||||
formdata=MultiDict([('key_name', 'Some key'), ('key_type', key_type)]))
|
||||
form.key_type.choices = [('a', 'a'), ('b', 'b')]
|
||||
form.validate()
|
||||
assert form.errors['key_type'] == [expected_error]
|
||||
|
||||
Reference in New Issue
Block a user