Permalink
Browse files

Prototype for mocking charms.layer.options

  • Loading branch information...
1 parent 07a77e4 commit a4c1b8355c9032d0e7f577af9ecc92e25e93f9e7 @johnsca johnsca committed Jun 29, 2016
Showing with 35 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +5 −0 test_requirements.txt
  3. +15 −0 tox.ini
  4. +12 −0 unit_tests/test_lib_base.py
View
@@ -0,0 +1,3 @@
+__pycache__
+.tox
+.cache
View
@@ -0,0 +1,5 @@
+mock
+pytest
+charmhelpers
+path.py
+charms.reactive
View
15 tox.ini
@@ -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

Please sign in to comment.