コード例 #1
0
ファイル: previews.py プロジェクト: imom0/django-mailviews
    def description(self):
        """
        A longer description of this preview that is used in the preview index.

        If not provided, this defaults to the first paragraph of the underlying
        message view class' docstring.
        """
        return getattr(split_docstring(self.message_view), 'summary', None)
コード例 #2
0
    def description(self):
        """
        A longer description of this preview that is used in the preview index.

        If not provided, this defaults to the first paragraph of the underlying
        message view class' docstring.
        """
        return getattr(split_docstring(self.message_view), 'summary', None)
コード例 #3
0
    def test_split_docstring_no_body(self):
        def fn():
            """Does a thing."""

        header, body = split_docstring(fn)
        self.assertEqual(header, "Does a thing.")
コード例 #4
0
 def test_split_docstring(self):
     header, body = split_docstring(split_docstring)
     self.assertEqual(header, "Splits the docstring of the given value into it's summary and body.")