summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_binding.py15
-rw-r--r--tests/test_config_notif.py4
-rw-r--r--tests/test_trapd_exit.py2
-rw-r--r--tests/test_trapd_get_cbs_config.py6
-rw-r--r--tests/test_trapd_http_session.py3
-rw-r--r--tests/test_trapd_runtime_pid.py4
-rw-r--r--tests/test_trapd_settings.py2
-rw-r--r--tests/test_trapd_vnf_table.py7
8 files changed, 9 insertions, 34 deletions
diff --git a/tests/test_binding.py b/tests/test_binding.py
index 25ab192..82e9f7f 100644
--- a/tests/test_binding.py
+++ b/tests/test_binding.py
@@ -2,6 +2,7 @@
# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
# Copyright (c) 2019 Pantheon.tech. All rights reserved.
# Copyright 2021 Samsung Electronics. All rights reserved.
+# Copyright 2021 Fujitsu Ltd.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,24 +17,10 @@
# limitations under the License.
# ============LICENSE_END=========================================================
-import os
-import io
import requests
import httpretty
-import sys
import subprocess
-import pytest
import json
-import base64
-import errno
-import time
-from pip._internal import main as _main
-from onap_dcae_cbs_docker_client.client import get_config
-from miss_htbt_service import htbtworker
-from miss_htbt_service import misshtbtd
-from miss_htbt_service import db_monitoring
-from miss_htbt_service.mod.trapd_vnf_table import hb_properties
-import unittest
MODULE_EXTENSIONS = ('.py', '.pyc', '.pyo')
diff --git a/tests/test_config_notif.py b/tests/test_config_notif.py
index 707717c..01ea737 100644
--- a/tests/test_config_notif.py
+++ b/tests/test_config_notif.py
@@ -1,6 +1,7 @@
# ============LICENSE_START=======================================================
# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
# Copyright 2020 Deutsche Telekom. All rights reserved.
+# Copyright 2021 Fujitsu Ltd.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,13 +17,12 @@
# ============LICENSE_END=========================================================
import config_notif
-# from miss_htbt_service.mod.trapd_get_cbs_config import get_cbs_config
import mod.trapd_get_cbs_config
import mod.trapd_settings
from . import monkey_psycopg2
import psycopg2
-import tempfile, sys, json, os
+import tempfile, json, os
def assert_default_values(ip_address, port_num, user_name, password, db_name, cbs_polling_required, cbs_polling_interval):
"""
diff --git a/tests/test_trapd_exit.py b/tests/test_trapd_exit.py
index abb6bf4..93e8f9a 100644
--- a/tests/test_trapd_exit.py
+++ b/tests/test_trapd_exit.py
@@ -1,6 +1,7 @@
# ============LICENSE_START=======================================================
# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
# Copyright (c) 2019 Pantheon.tech. All rights reserved.
+# Copyright 2021 Fujitsu Ltd.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,7 +18,6 @@
import pytest
import unittest
-import sys
from miss_htbt_service.mod import trapd_exit
pid_file="/tmp/test_pid_file"
diff --git a/tests/test_trapd_get_cbs_config.py b/tests/test_trapd_get_cbs_config.py
index 8691a89..ea859af 100644
--- a/tests/test_trapd_get_cbs_config.py
+++ b/tests/test_trapd_get_cbs_config.py
@@ -1,6 +1,7 @@
# ============LICENSE_START=======================================================
# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
# Copyright (c) 2019 Pantheon.tech. All rights reserved.
+# Copyright 2021 Fujitsu Ltd.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,12 +19,7 @@
import pytest
import unittest
import os
-import sys
-from onap_dcae_cbs_docker_client.client import get_config
-from miss_htbt_service.mod.trapd_exit import cleanup_and_exit
-from miss_htbt_service.mod.trapd_io import stdout_logger
-from miss_htbt_service.mod import trapd_settings as tds
from miss_htbt_service.mod import trapd_get_cbs_config
class test_get_cbs_config(unittest.TestCase):
diff --git a/tests/test_trapd_http_session.py b/tests/test_trapd_http_session.py
index 948dd5e..d36ced0 100644
--- a/tests/test_trapd_http_session.py
+++ b/tests/test_trapd_http_session.py
@@ -1,6 +1,7 @@
# ============LICENSE_START=======================================================
# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
# Copyright (c) 2019 Pantheon.tech. All rights reserved.
+# Copyright 2021 Fujitsu Ltd.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,9 +16,7 @@
# limitations under the License.
# ============LICENSE_END=========================================================
-import pytest
import unittest
-import sys
from miss_htbt_service.mod import trapd_http_session
class test_init_session_obj(unittest.TestCase):
diff --git a/tests/test_trapd_runtime_pid.py b/tests/test_trapd_runtime_pid.py
index ecb063c..d03e246 100644
--- a/tests/test_trapd_runtime_pid.py
+++ b/tests/test_trapd_runtime_pid.py
@@ -1,6 +1,7 @@
# ============LICENSE_START=======================================================
# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
# Copyright (c) 2019 Pantheon.tech. All rights reserved.
+# Copyright 2021 Fujitsu Ltd.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,11 +16,8 @@
# limitations under the License.
# ============LICENSE_END=========================================================
-import pytest
import unittest
-import sys
from miss_htbt_service.mod import trapd_runtime_pid
-from miss_htbt_service.mod import trapd_io
class test_save_pid(unittest.TestCase):
"""
diff --git a/tests/test_trapd_settings.py b/tests/test_trapd_settings.py
index 33fb0ab..5d6cd0d 100644
--- a/tests/test_trapd_settings.py
+++ b/tests/test_trapd_settings.py
@@ -1,6 +1,7 @@
# ============LICENSE_START=======================================================
# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
# Copyright (c) 2019 Pantheon.tech. All rights reserved.
+# Copyright 2021 Fujitsu Ltd.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,7 +16,6 @@
# limitations under the License.
# ============LICENSE_END=========================================================
-import pytest
import unittest
from miss_htbt_service.mod import trapd_settings as tds
diff --git a/tests/test_trapd_vnf_table.py b/tests/test_trapd_vnf_table.py
index d0bf51c..3d1d34b 100644
--- a/tests/test_trapd_vnf_table.py
+++ b/tests/test_trapd_vnf_table.py
@@ -4,6 +4,7 @@
# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved.
# Copyright (c) 2019 Pantheon.tech. All rights reserved.
# Copyright 2020 Deutsche Telekom. All rights reserved.
+# Copyright 2021 Fujitsu Ltd.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -24,12 +25,6 @@ test_trapd_vnf_table contains test cases related to DB Tables and cbs polling.
"""
import unittest
-import sys
-import pytest
-import logging
-import misshtbtd as db
-import htbtworker as pm
-import db_monitoring as dbmon
import get_logger
from mod.trapd_vnf_table import (
verify_DB_creation_1, verify_DB_creation_2, verify_DB_creation_hb_common,