From c850beb64083c730301188ade4cbba0f2a329a92 Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Wed, 16 Nov 2016 18:16:43 +0100 Subject: Refactor reporting dir - dockerization - create util function for all the test projects - create a common config files - add unit tests - pep8 JIRA: RELENG-162 Change-Id: Ib209be4233084100ff238a7aeb2843ccc24a6f1e Signed-off-by: Morgan Richomme --- utils/test/reporting/tests/unit/__init__.py | 0 utils/test/reporting/tests/unit/utils/__init__.py | 0 .../test/reporting/tests/unit/utils/test_utils.py | 29 ++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 utils/test/reporting/tests/unit/__init__.py create mode 100644 utils/test/reporting/tests/unit/utils/__init__.py create mode 100644 utils/test/reporting/tests/unit/utils/test_utils.py (limited to 'utils/test/reporting/tests/unit') diff --git a/utils/test/reporting/tests/unit/__init__.py b/utils/test/reporting/tests/unit/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/utils/test/reporting/tests/unit/utils/__init__.py b/utils/test/reporting/tests/unit/utils/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/utils/test/reporting/tests/unit/utils/test_utils.py b/utils/test/reporting/tests/unit/utils/test_utils.py new file mode 100644 index 000000000..b9c39806c --- /dev/null +++ b/utils/test/reporting/tests/unit/utils/test_utils.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python + +# Copyright (c) 2016 Orange and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 + +import logging +import unittest + +from utils import reporting_utils + + +class reportingUtilsTesting(unittest.TestCase): + + logging.disable(logging.CRITICAL) + + def setUp(self): + self.test = reporting_utils + + def test_getConfig(self): + self.assertEqual(self.test.get_config("general.period"), 10) +# TODO +# ... + +if __name__ == "__main__": + unittest.main(verbosity=2) -- cgit 1.2.3-korg