Permalink
Please sign in to comment.
Showing
with
35 additions
and 0 deletions.
- +3 −0 .gitignore
- +5 −0 test_requirements.txt
- +15 −0 tox.ini
- +12 −0 unit_tests/test_lib_base.py
| @@ -0,0 +1,3 @@ | ||
| +__pycache__ | ||
| +.tox | ||
| +.cache |
| @@ -0,0 +1,5 @@ | ||
| +mock | ||
| +pytest | ||
| +charmhelpers | ||
| +path.py | ||
| +charms.reactive |
| @@ -0,0 +1,15 @@ | ||
| +[tox] | ||
| +skipsdist=True | ||
| +envlist = py34, py35 | ||
| +skip_missing_interpreters = True | ||
| + | ||
| +[testenv] | ||
| +commands = py.test -v | ||
| +deps = | ||
| + -r{toxinidir}/test_requirements.txt | ||
| + -r{toxinidir}/wheelhouse.txt | ||
| +setenv = | ||
| + PYTHONPATH={toxinidir}/lib:{toxinidir}/reactive | ||
| + | ||
| +[flake8] | ||
| +exclude=docs |
| @@ -0,0 +1,12 @@ | ||
| +import mock | ||
| +from unittest import TestCase | ||
| + | ||
| + | ||
| +import charms.layer # noqa | ||
| +with mock.patch('charms.layer.options', create=True): | ||
| + from charms.layer.apache_bigtop_base import Bigtop | ||
| + | ||
| + | ||
| +class TestLibBase(TestCase): | ||
| + def test_it(self): | ||
| + assert Bigtop |
0 comments on commit
a4c1b83