diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2019-12-19 12:39:01 -0500 |
---|---|---|
committer | Parker Berberian <pberberian@iol.unh.edu> | 2020-01-28 16:09:35 -0500 |
commit | 77377d5e9362bd35a3b300df231e82ee974675e1 (patch) | |
tree | 5e3799768eb887a0259c8c21ed61123cdde2d608 /src/workflow/tests | |
parent | 899e1a4baa95d0bc6f0eef34de66f0e257174878 (diff) |
Comments and Documentation
This change adds a ton of comments and documentation across all the code.
Change-Id: Ifee0a2f534e8584f14b0f13af4dda8dc70eb7553
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/workflow/tests')
-rw-r--r-- | src/workflow/tests/test_steps.py | 15 | ||||
-rw-r--r-- | src/workflow/tests/test_workflows.py | 4 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/workflow/tests/test_steps.py b/src/workflow/tests/test_steps.py index 39b1f86..6101d4f 100644 --- a/src/workflow/tests/test_steps.py +++ b/src/workflow/tests/test_steps.py @@ -8,7 +8,8 @@ ############################################################################## """ -This file tests basic functionality of each step class +This file tests basic functionality of each step class. + More in depth case coverage of WorkflowStep.post() must happen elsewhere. """ @@ -28,9 +29,11 @@ from workflow.tests import test_fixtures class TestConfig: """ - Basic class to instantiate and hold reference + Basic class to instantiate and hold reference. + to models we will need often """ + def __init__(self, usr=None): self.lab = make_lab() self.user = usr or make_user() @@ -77,6 +80,8 @@ class StepTestCase(TestCase): def assertCorrectPostBehavior(self, post_data): """ + Stub for validating step behavior on POST request. + allows subclasses to override and make assertions about the side effects of self.step.post() post_data is the data passed into post() @@ -85,6 +90,8 @@ class StepTestCase(TestCase): def add_to_repo(self, repo): """ + Stub for modifying the step's repo. + This method is a hook that allows subclasses to modify the contents of the repo before the step is created. """ @@ -92,8 +99,8 @@ class StepTestCase(TestCase): def assertValidHtml(self, html_str): """ - This method should make sure that html_str is a valid - html fragment. + Assert that html_str is a valid html fragment. + However, I know of no good way of doing this in python """ self.assertTrue(isinstance(html_str, str)) diff --git a/src/workflow/tests/test_workflows.py b/src/workflow/tests/test_workflows.py index 293e43d..995d699 100644 --- a/src/workflow/tests/test_workflows.py +++ b/src/workflow/tests/test_workflows.py @@ -50,9 +50,7 @@ class WorkflowTestCase(TestCase): session.save() def render_steps(self): - """ - retrieves each step individually at /wf/workflow/step=<index> - """ + """Retrieve each step individually at /wf/workflow/step=<index>.""" for i in range(self.step_count): # renders the step itself, not in an iframe exception = None |