From ce719de6d17d9b5f4233c130a6586ce265b7fe03 Mon Sep 17 00:00:00 2001 From: "stark, steven" Date: Tue, 17 Apr 2018 12:40:01 -0700 Subject: [VVP] adding 2 tests to increase sonar Added tests for frontend and config for sonar coverage Change-Id: I9a3648c84c6d673bd86232debbedb1bcfce0d253 Issue-ID: VVP-55 Signed-off-by: stark, steven --- imagescanner/imagescanner/tests/test_frontend.py | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 imagescanner/imagescanner/tests/test_frontend.py (limited to 'imagescanner/imagescanner/tests/test_frontend.py') diff --git a/imagescanner/imagescanner/tests/test_frontend.py b/imagescanner/imagescanner/tests/test_frontend.py new file mode 100644 index 0000000..695961e --- /dev/null +++ b/imagescanner/imagescanner/tests/test_frontend.py @@ -0,0 +1,45 @@ +# ============LICENSE_START======================================================= +# org.onap.vvp/image-scanner +# =================================================================== +# Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# =================================================================== +# +# Unless otherwise specified, all software contained herein is licensed +# under the Apache License, Version 2.0 (the “License”); +# you may not use this software except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +# Unless otherwise specified, all documentation contained herein is licensed +# under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +# you may not use this documentation except in compliance with the License. +# You may obtain a copy of the License at +# +# https://creativecommons.org/licenses/by/4.0/ +# +# Unless required by applicable law or agreed to in writing, documentation +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ============LICENSE_END============================================ +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# +from .. import frontend + + +def test_frontend_invalid(): + app = frontend.app + resp = app.test_client().get('/imagescanner/result/invalidlocation') + assert resp.status_code == 404 -- cgit 1.2.3-korg