summaryrefslogtreecommitdiffstats
path: root/adapter/acumos/tests/test_fed.py
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2020-08-03 18:15:21 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-03 18:15:21 +0000
commitba3d7306c1773ea78ad7a87468fc66b9b4f18551 (patch)
treebd39a59806e9772d6b597b0e0db48d5b9035fcbf /adapter/acumos/tests/test_fed.py
parent9f7c742ea64a6acb4f5ce2b8df885750c68a2ed3 (diff)
parent711d4eae913f34e78aa10e8cd511f3b8e43cd54f (diff)
Merge "Pull JSON schemas at build/test not run time"
Diffstat (limited to 'adapter/acumos/tests/test_fed.py')
-rw-r--r--adapter/acumos/tests/test_fed.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/adapter/acumos/tests/test_fed.py b/adapter/acumos/tests/test_fed.py
index 4d3636f..6119976 100644
--- a/adapter/acumos/tests/test_fed.py
+++ b/adapter/acumos/tests/test_fed.py
@@ -1,7 +1,7 @@
# ============LICENSE_START====================================================
# org.onap.dcae
# =============================================================================
-# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved.
# =============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -19,7 +19,6 @@
import json
import requests
-from testing_helpers import get_json_fixture as get_test_json
from testing_helpers import get_fixture_path as get_test_file
from aoconversion import docker_gen as aoc_docker_gen
@@ -157,11 +156,6 @@ _mockwebdata = {
'https://acumos/artifacts/a2/content': _r(file=get_test_file('models/example-model/model.proto')),
'https://acumos/artifacts/a3/content': _r(data=b'dummy zip archive data'),
'https://acumos/artifacts/a4/content': _r(file=get_test_file('models/example-model/metadata.json')),
- 'http://json-schema.org/draft-04/schema#': _r(get_test_json('jsdraft4schema.json')),
- 'https://gerrit.onap.org/r/gitweb?p=dcaegen2/platform/cli.git;a=blob_plain;f=component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json;hb=HEAD': _r(get_test_json('dataformat_101.json')),
- 'http://dcaeurl//component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json': _r(get_test_json('dataformat_101.json')),
- 'https://gerrit.onap.org/r/gitweb?p=dcaegen2/platform/cli.git;a=blob_plain;f=component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json;hb=HEAD': _r(get_test_json('dcae-cli-v2_component-spec-schema.json')),
- 'http://dcaeurl//component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json': _r(get_test_json('dcae-cli-v2_component-spec-schema.json')),
}
@@ -170,7 +164,7 @@ _mockwebdata = {
#
-def test_aoconversion(tmpdir, monkeypatch):
+def test_aoconversion(mock_schemas, tmpdir, monkeypatch):
config = aoc_scanner.Config(dcaeurl='http://dcaeurl', dcaeuser='dcaeuser', onboardingurl='https://onboarding', onboardinguser='obuser', onboardingpass='obpass', acumosurl='https://acumos', certfile=None, dockerregistry='dockerregistry', dockeruser='registryuser', dockerpass='registrypassword')
monkeypatch.setattr(aoc_docker_gen, 'APIClient', _mockdocker.APIClient)
monkeypatch.setattr(requests, 'get', _mockwww(_mockwebdata))