summaryrefslogtreecommitdiff
path: root/framework/tests
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2014-04-23 19:27:45 -0700
committerDylan Baker <baker.dylan.c@gmail.com>2014-05-13 16:06:49 -0700
commitf542f813d34c75e346f2a6c51ebf3f0ab9ac2738 (patch)
tree18b19332efc238cc51e788f8efa09d6017f4971e /framework/tests
parent3442cd00312770b6c8bb878204b2e0153069d988 (diff)
profile_tests.py: Add tests for loadTestProfile
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Diffstat (limited to 'framework/tests')
-rw-r--r--framework/tests/profile_tests.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/framework/tests/profile_tests.py b/framework/tests/profile_tests.py
index c5bdf342e..7881b2406 100644
--- a/framework/tests/profile_tests.py
+++ b/framework/tests/profile_tests.py
@@ -20,9 +20,28 @@
""" Provides test for the framework.profile modules """
+import nose.tools as nt
import framework.profile as profile
def test_initialize_testprofile():
""" TestProfile initializes """
profile.TestProfile()
+
+
+@nt.raises(SystemExit)
+def test_load_test_profile_no_profile():
+ """ Loading a module with no profile name exits
+
+ Beacuse loadTestProfile uses test.{} to load a module we need a module in
+ tests that doesn't have a profile attribute. The only module that currently
+ meets that requirement is __init__.py
+
+ """
+ profile.loadTestProfile('__init__')
+
+
+def test_load_test_profile_returns():
+ """ loadTestProfile returns a TestProfile instance """
+ profile_ = profile.loadTestProfile('sanity')
+ assert isinstance(profile_, profile.TestProfile)