コード例 #1
0
 def test(self):
     """Testing indent filter"""
     self.assertEqual(djblets_utils.indent('foo'), '    foo')
     self.assertEqual(djblets_utils.indent('foo', 3), '   foo')
     self.assertEqual(djblets_utils.indent('foo\nbar'), '    foo\n    bar')
コード例 #2
0
ファイル: tests.py プロジェクト: dekoza/djblets
 def test(self):
     """Testing indent filter"""
     self.assertEqual(djblets_utils.indent('foo'), '    foo')
     self.assertEqual(djblets_utils.indent('foo', 3), '   foo')
     self.assertEqual(djblets_utils.indent('foo\nbar'), '    foo\n    bar')
コード例 #3
0
 def test_with_custom_indent(self):
     """Testing {{...|indent}} with custom indentation level"""
     self.assertEqual(indent('foo', 3), '   foo')
コード例 #4
0
 def test_with_multiple_lines(self):
     """Testing {{...|indent}} with multiple lines"""
     self.assertEqual(indent('foo\nbar'), '    foo\n    bar')
コード例 #5
0
 def test_with_default_indent(self):
     """Testing {{...|indent}} with default indentation level"""
     self.assertEqual(indent('foo'), '    foo')
コード例 #6
0
ファイル: tests.py プロジェクト: buriy/djblets
 def test(self):
     """Testing indent filter"""
     self.assertEqual(djblets_utils.indent("foo"), "    foo")
     self.assertEqual(djblets_utils.indent("foo", 3), "   foo")
     self.assertEqual(djblets_utils.indent("foo\nbar"), "    foo\n    bar")
コード例 #7
0
 def test_with_multiple_lines(self):
     """Testing {{...|indent}} with multiple lines"""
     self.assertEqual(indent('foo\nbar'),
                      '    foo\n    bar')
コード例 #8
0
 def test_with_custom_indent(self):
     """Testing {{...|indent}} with custom indentation level"""
     self.assertEqual(indent('foo', 3), '   foo')
コード例 #9
0
 def test_with_default_indent(self):
     """Testing {{...|indent}} with default indentation level"""
     self.assertEqual(indent('foo'), '    foo')