From 13d6a0f667f5be012f9dd6adec93190351d9cce5 Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Tue, 10 Mar 2015 16:12:42 +0200 Subject: [PATCH] adding .coveragerc and some tests --- .coveragerc | 3 +++ tests/__init__.py | 1 + tests/test_injections.py | 16 ++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 .coveragerc create mode 100644 tests/test_injections.py diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..7c3eb86d --- /dev/null +++ b/.coveragerc @@ -0,0 +1,3 @@ +[run] +include = objects/* +omit = tests/* diff --git a/tests/__init__.py b/tests/__init__.py index e69de29b..35e432be 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1 @@ +"""Objects unittests.""" diff --git a/tests/test_injections.py b/tests/test_injections.py new file mode 100644 index 00000000..dbfa6549 --- /dev/null +++ b/tests/test_injections.py @@ -0,0 +1,16 @@ +"""Objects injections unittests.""" + +import unittest2 as unittest +from objects.injections import Injection + + +class InjectionTest(unittest.TestCase): + + """Injection test cases.""" + + def test_init(self): + """Test Injection creation and initialization.""" + injection = Injection('some_arg_name', 'some_value') + + self.assertEqual(injection.name, 'some_arg_name') + self.assertEqual(injection.injectable, 'some_value')