Work in progress on credential/job updates.

This commit is contained in:
Chris Church
2013-04-23 16:21:29 -04:00
parent 3a9533ffa0
commit cc25d55121
7 changed files with 675 additions and 25 deletions

View File

@@ -74,6 +74,20 @@ class RunJobTest(BaseCeleryTest):
if self.test_project_path:
shutil.rmtree(self.test_project_path, True)
def create_test_credential(self, **kwargs):
opts = {
'name': 'test-creds',
'user': self.super_django_user,
'default_username': '',
'ssh_key_data': '',
'ssh_key_unlock': '',
'ssh_password': '',
'sudo_password': '',
}
opts.update(kwargs)
self.credential = Credential.objects.create(**opts)
return self.credential
def create_test_project(self, playbook_content):
self.project = self.make_projects(self.normal_django_user, 1, playbook_content)[0]
self.organization.projects.add(self.project)