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