Commit 3e44f8a2 by JonahStanley

Component test now fails with useful information

parent d552eef9
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#pylint: disable=W0621 #pylint: disable=W0621
from lettuce import world, step from lettuce import world, step
from nose.tools import assert_true
DATA_LOCATION = 'i4x://edx/templates' DATA_LOCATION = 'i4x://edx/templates'
...@@ -26,7 +27,7 @@ def add_components(step): ...@@ -26,7 +27,7 @@ def add_components(step):
def check_components(step): def check_components(step):
for component in [step_hash['Component'] for step_hash in step.hashes]: for component in [step_hash['Component'] for step_hash in step.hashes]:
assert component in COMPONENT_DICTIONARY assert component in COMPONENT_DICTIONARY
assert COMPONENT_DICTIONARY[component]['found_func']() assert_true(COMPONENT_DICTIONARY[component]['found_func'](), "{} couldn't be found".format(component))
@step(u'I delete all components') @step(u'I delete all components')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment