fixes network cred failure in travis

This commit is contained in:
Chris Meyers 2016-07-22 15:36:08 -04:00
parent 2a791b8e90
commit c7524892c0
2 changed files with 5 additions and 1 deletions

View File

@ -39,3 +39,7 @@ def job_with_secret_key_factory(job_template_factory):
@pytest.fixture
def job_with_secret_key_unit(job_with_secret_key_factory):
return job_with_secret_key_factory(persisted=False)
@pytest.fixture
def get_ssh_version(mocker):
return mocker.patch('awx.main.tasks.get_ssh_version', return_value='OpenSSH_6.9p1, LibreSSL 2.1.8')

View File

@ -33,7 +33,7 @@ def test_net_cred_parse(mocker, options):
assert env['ANSIBLE_NET_AUTHORIZE_PASSWORD'] == options['authorize_password']
def test_net_cred_ssh_agent(mocker, options):
def test_net_cred_ssh_agent(mocker, options, get_ssh_version):
with mocker.patch('django.db.ConnectionRouter.db_for_write'):
run_job = RunJob()