From 983ab0fe41071e4d6fc5e6431351471bfdf5a455 Mon Sep 17 00:00:00 2001
From: Simon Albinsson <zinob@aevy.com>
Date: Wed, 1 Feb 2017 13:20:02 +0100
Subject: [PATCH] Lets allow the helpers to be helpfull

I had problems transissioning form python 2 to 3 due to imports failing
when running tests. This shows (what i hope) is the correct way of
dealing with imports.
---
 sample/core.py         | 5 ++++-
 sample/helpers.py      | 3 +++
 tests/test_advanced.py | 4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sample/core.py b/sample/core.py
index 2cea5dc..19bf06c 100644
--- a/sample/core.py
+++ b/sample/core.py
@@ -1,9 +1,12 @@
 # -*- coding: utf-8 -*-
+from . import helpers
 
 def get_hmm():
     """Get a thought."""
     return 'hmmm...'
 
+
 def hmm():
     """Contemplation..."""
-    print get_hmm()
\ No newline at end of file
+    if helpers.get_answer():
+        print(get_hmm())
diff --git a/sample/helpers.py b/sample/helpers.py
index e69de29..63ab898 100644
--- a/sample/helpers.py
+++ b/sample/helpers.py
@@ -0,0 +1,3 @@
+def get_answer():
+    """Get an answer."""
+    return True
diff --git a/tests/test_advanced.py b/tests/test_advanced.py
index 5438ac3..cc48248 100644
--- a/tests/test_advanced.py
+++ b/tests/test_advanced.py
@@ -9,8 +9,8 @@ class AdvancedTestSuite(unittest.TestCase):
     """Advanced test cases."""
 
     def test_thoughts(self):
-        sample.hmm()
+        self.assertIsNone(sample.hmm())
 
 
 if __name__ == '__main__':
-    unittest.main()
\ No newline at end of file
+    unittest.main()
-- 
GitLab