Example #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')
Example #2
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')
Example #3
0
 def test_with_custom_indent(self):
     """Testing {{...|indent}} with custom indentation level"""
     self.assertEqual(indent('foo', 3), '   foo')
Example #4
0
 def test_with_multiple_lines(self):
     """Testing {{...|indent}} with multiple lines"""
     self.assertEqual(indent('foo\nbar'), '    foo\n    bar')
Example #5
0
 def test_with_default_indent(self):
     """Testing {{...|indent}} with default indentation level"""
     self.assertEqual(indent('foo'), '    foo')
Example #6
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")
 def test_with_multiple_lines(self):
     """Testing {{...|indent}} with multiple lines"""
     self.assertEqual(indent('foo\nbar'),
                      '    foo\n    bar')
 def test_with_custom_indent(self):
     """Testing {{...|indent}} with custom indentation level"""
     self.assertEqual(indent('foo', 3), '   foo')
 def test_with_default_indent(self):
     """Testing {{...|indent}} with default indentation level"""
     self.assertEqual(indent('foo'), '    foo')