Skip to content

Commit ad1fcbc

Browse files
Add custom_injectors to test code path
* Unit tests do not create CredentialType records for Credential plugins. Instead, they explicitly instantiate CredentialType(s) for Credential plugins. They rely on CredentialType.defaults[key] to do so. This change makes sure custom_injectors get bolted onto the created CredentialType.
1 parent b3b3025 commit ad1fcbc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

awx/main/models/credential.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,9 @@ def get_creation_params(self):
701701
)
702702

703703
def create(self):
704-
return CredentialType(**self.get_creation_params())
704+
res = CredentialType(**self.get_creation_params())
705+
res.custom_injectors = self.custom_injectors
706+
return res
705707

706708

707709
class CredentialInputSource(PrimordialModel):

0 commit comments

Comments
 (0)