Commit f623e429 by Peter Baratta

Fix formatting of docstrings; add more docstrings

parent b68e1e20
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""Tests of the Capa XModule""" """
Tests of the Capa XModule
"""
#pylint: disable=C0111 #pylint: disable=C0111
#pylint: disable=R0904 #pylint: disable=R0904
#pylint: disable=C0103 #pylint: disable=C0103
...@@ -48,12 +50,16 @@ class CapaFactory(object): ...@@ -48,12 +50,16 @@ class CapaFactory(object):
@staticmethod @staticmethod
def input_key(): def input_key():
""" Return the input key to use when passing GET parameters """ """
Return the input key to use when passing GET parameters
"""
return ("input_" + CapaFactory.answer_key()) return ("input_" + CapaFactory.answer_key())
@staticmethod @staticmethod
def answer_key(): def answer_key():
""" Return the key stored in the capa problem answer dict """ """
Return the key stored in the capa problem answer dict
"""
return ("-".join(['i4x', 'edX', 'capa_test', 'problem', return ("-".join(['i4x', 'edX', 'capa_test', 'problem',
'SampleProblem%d' % CapaFactory.num]) + 'SampleProblem%d' % CapaFactory.num]) +
"_2_1") "_2_1")
...@@ -362,7 +368,9 @@ class CapaModuleTest(unittest.TestCase): ...@@ -362,7 +368,9 @@ class CapaModuleTest(unittest.TestCase):
result = CapaModule.make_dict_of_responses(invalid_get_dict) result = CapaModule.make_dict_of_responses(invalid_get_dict)
def _querydict_from_dict(self, param_dict): def _querydict_from_dict(self, param_dict):
""" Create a Django QueryDict from a Python dictionary """ """
Create a Django QueryDict from a Python dictionary
"""
# QueryDict objects are immutable by default, so we make # QueryDict objects are immutable by default, so we make
# a copy that we can update. # a copy that we can update.
......
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