mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 21:46:00 -03:30
don't allow Accept:application/json on /api/login/
see: https://github.com/ansible/tower/issues/1672
This commit is contained in:
@@ -24,6 +24,20 @@ class AlwaysPassBackend(object):
|
||||
return '{}.{}'.format(cls.__module__, cls.__name__)
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@pytest.mark.parametrize('accept, status', [
|
||||
['*/*', 200],
|
||||
['text/html', 200],
|
||||
['application/json', 406]
|
||||
])
|
||||
def test_login_json_not_allowed(get, accept, status):
|
||||
get(
|
||||
'/api/login/',
|
||||
HTTP_ACCEPT=accept,
|
||||
expect=status
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Needs Update - CA")
|
||||
@pytest.mark.django_db
|
||||
def test_session_create_delete(admin, post, get):
|
||||
|
||||
Reference in New Issue
Block a user