Skip to content

Commit 23c1ab4

Browse files
committed
Fix test bug
1 parent 21d985b commit 23c1ab4

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

ansible_base/lib/testing/util.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ def delete_authenticator(authenticator):
4747
class StaticResourceAPIClient(ResourceAPIClient):
4848
"""A testing API client that reads response router attribute or static files."""
4949

50-
router = {}
51-
# Route is used to force a certain status,response for a route
52-
# It has to be a mutable default but the fixture instantiates one for
53-
# each test.
50+
def __init__(self, *args, **kwargs):
51+
# Route is used to force a certain status,response for a route
52+
# It has to be a mutable default but the fixture instantiates one for
53+
# each test.
54+
self.router = {}
55+
super().__init__(*args, **kwargs)
5456

5557
def _make_request(self, method, path, data=None, params=None, stream=False):
5658
response = Response()

ansible_base/resource_registry/rest_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import requests
77
import urllib3
88
from django.apps import apps
9-
from django.conf import settings
109

1110
from ansible_base.lib.utils.apps import is_rbac_installed
1211
from ansible_base.resource_registry.resource_server import get_resource_server_config, get_service_token

0 commit comments

Comments
 (0)