Relocate encryption helpers, update settings, tests, and imports

This commit is contained in:
Wayne Witzel III
2017-06-09 14:38:13 -04:00
parent 2dcce4d615
commit b5d61c3c53
14 changed files with 201 additions and 203 deletions
+17
View File
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Ansible, Inc.
# All Rights Reserved.
import pytest
from awx.main.utils import common
@pytest.mark.parametrize('input_, output', [
({"foo": "bar"}, {"foo": "bar"}),
('{"foo": "bar"}', {"foo": "bar"}),
('---\nfoo: bar', {"foo": "bar"}),
(4399, {}),
])
def test_parse_yaml_or_json(input_, output):
assert common.parse_yaml_or_json(input_) == output