Merge pull request #45573 from gtmanfred/2017.7.3

update 2017.7.3 tests
This commit is contained in:
Nicole Thomas 2018-01-20 15:05:12 -05:00 committed by GitHub
commit 19cd97ed3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View file

@ -493,10 +493,11 @@ PATCHLEVEL = 3
log.debug(
'Testing Docker cgroup substring \'%s\'', cgroup_substr)
with patch('salt.utils.fopen', mock_open(read_data=cgroup_data)):
self.assertEqual(
core._virtual({'kernel': 'Linux'}).get('virtual_subtype'),
'Docker'
)
with patch.dict(core.__salt__, {'cmd.run_all': MagicMock()}):
self.assertEqual(
core._virtual({'kernel': 'Linux'}).get('virtual_subtype'),
'Docker'
)
def _check_ipaddress(self, value, ip_v):
'''

View file

@ -892,7 +892,7 @@ class TestCustomExtensions(TestCase):
def test_http_query(self):
'''Test the `http_query` Jinja filter.'''
for backend in ('requests', 'tornado', 'urllib2'):
rendered = render_jinja_tmpl("{{ 'http://www.google.com' | http_query(backend='" + backend + "') }}",
rendered = render_jinja_tmpl("{{ 'http://icanhazip.com' | http_query(backend='" + backend + "') }}",
dict(opts=self.local_opts, saltenv='test', salt=self.local_salt))
self.assertIsInstance(rendered, six.text_type, 'Failed with backend: {}'.format(backend))
dict_reply = ast.literal_eval(rendered)