From df2c159592cd8b7c0bb4546539e8557253527d87 Mon Sep 17 00:00:00 2001 From: Agustin Henze Date: Feb 28 2018 17:58:03 +0000 Subject: Test case for the base class publisher --- diff --git a/README b/README index 30ba3b4..07c5cc0 100644 --- a/README +++ b/README @@ -11,6 +11,17 @@ Here's how to install the dependencies of skt like this: $ sudo yum install python2 python2-junit_xml beaker-client +Run tests +--------- + +For running all tests write down: + + $ python -m unittest discover tests + +For running some specific tests you can do this as following: + + $ python -m unittest tests.test_publisher + License ------- skt is distributed under GPLv2 license. diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/__init__.py diff --git a/tests/test_publisher.py b/tests/test_publisher.py new file mode 100644 index 0000000..1ed1f6d --- /dev/null +++ b/tests/test_publisher.py @@ -0,0 +1,8 @@ +import unittest +from skt import publisher + + +class TestPublisher(unittest.TestCase): + def test_geturl(self): + pub = publisher.publisher('dest', 'file:///tmp/test') + self.assertEqual(pub.geturl('source'), 'file:///tmp/test/source')