Exemplo n.º 1
0
 def test(self):
     """Testing escapespaces filter"""
     self.assertEqual(djblets_utils.escapespaces('Hi there'), 'Hi there')
     self.assertEqual(djblets_utils.escapespaces('Hi  there'),
                      'Hi  there')
     self.assertEqual(djblets_utils.escapespaces('Hi  there\n'),
                      'Hi&nbsp; there<br />')
Exemplo n.º 2
0
 def test(self):
     """Testing escapespaces filter"""
     self.assertEqual(djblets_utils.escapespaces('Hi there'),
                      'Hi there')
     self.assertEqual(djblets_utils.escapespaces('Hi  there'),
                      'Hi&nbsp; there')
     self.assertEqual(djblets_utils.escapespaces('Hi  there\n'),
                      'Hi&nbsp; there<br />')
Exemplo n.º 3
0
 def test_with_multiple_spaces(self):
     """Testing {{...|escapespaces}} with multiple consecutive spaces"""
     self.assertEqual(escapespaces('Hi  there'), 'Hi&nbsp; there')
Exemplo n.º 4
0
 def test_with_newline(self):
     """Testing {{...|escapespaces}} with newline"""
     self.assertEqual(escapespaces('Hi  there\n'), 'Hi&nbsp; there<br />')
Exemplo n.º 5
0
 def test_with_single_space(self):
     """Testing {{...|escapespaces}} with single space"""
     self.assertEqual(escapespaces('Hi there'), 'Hi there')
Exemplo n.º 6
0
 def test(self):
     """Testing escapespaces filter"""
     self.assertEqual(djblets_utils.escapespaces("Hi there"), "Hi there")
     self.assertEqual(djblets_utils.escapespaces("Hi  there"), "Hi&nbsp; there")
     self.assertEqual(djblets_utils.escapespaces("Hi  there\n"), "Hi&nbsp; there<br />")
Exemplo n.º 7
0
 def test_with_newline(self):
     """Testing {{...|escapespaces}} with newline"""
     self.assertEqual(escapespaces('Hi  there\n'),
                      'Hi&nbsp; there<br />')
Exemplo n.º 8
0
 def test_with_multiple_spaces(self):
     """Testing {{...|escapespaces}} with multiple consecutive spaces"""
     self.assertEqual(escapespaces('Hi  there'),
                      'Hi&nbsp; there')
Exemplo n.º 9
0
 def test_with_single_space(self):
     """Testing {{...|escapespaces}} with single space"""
     self.assertEqual(escapespaces('Hi there'),
                      'Hi there')