mirror of
https://github.com/ansible/awx.git
synced 2026-02-20 04:30:05 -03:30
avoid error in templating error
This commit is contained in:
@@ -16,6 +16,9 @@ from awx.api.views import (
|
||||
from awx.main.models import (
|
||||
Host,
|
||||
)
|
||||
from awx.main.views import handle_error
|
||||
|
||||
from rest_framework.test import APIRequestFactory
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -25,6 +28,12 @@ def mock_response_new(mocker):
|
||||
return m
|
||||
|
||||
|
||||
def test_handle_error():
|
||||
# Assure that templating of error does not raise errors
|
||||
request = APIRequestFactory().get('/fooooo/')
|
||||
handle_error(request)
|
||||
|
||||
|
||||
class TestApiRootView:
|
||||
def test_get_endpoints(self, mocker, mock_response_new):
|
||||
endpoints = [
|
||||
|
||||
Reference in New Issue
Block a user