1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Fix ad_hoc.py tests again

Credential fix
This commit is contained in:
Akita Noek 2016-03-23 12:09:04 -04:00
parent 7fa47c1b38
commit 8afa10466f

View File

@ -383,7 +383,11 @@ class BaseTestMixin(QueueTestMixin, MockCommonlySlowTestMixin):
'vault_password': '',
}
opts.update(kwargs)
return Credential.objects.create(**opts)
user = opts['user']
del opts['user']
cred = Credential.objects.create(**opts)
cred.owner_role.members.add(user)
return cred
def setup_instances(self):
instance = Instance(uuid=settings.SYSTEM_UUID, primary=True, hostname='127.0.0.1')